PackageExtensionsRegisterPackages Method (Container, IEnumerableAssembly)

Simple Injector
Loads all IPackage implementations from the given set of assemblies and calls their Register method. Note that only publicly exposed classes that contain a public default constructor will be loaded.

Namespace:  SimpleInjector
Assembly:  SimpleInjector.Packaging (in SimpleInjector.Packaging.dll) Version: 4.0.0
Syntax

public static void RegisterPackages(
	this Container container,
	IEnumerable<Assembly> assemblies
)

Parameters

container
Type: SimpleInjectorContainer
The container to which the packages will be applied to.
assemblies
Type: System.Collections.GenericIEnumerableAssembly
The assemblies that will be searched for packages.

Usage Note

In Visual Basic and C#, you can call this method as an instance method on any object of type Container. When you use instance method syntax to call this method, omit the first parameter. For more information, see Extension Methods (Visual Basic) or Extension Methods (C# Programming Guide).
Exceptions

ExceptionCondition
ArgumentNullExceptionThrown when the container is a null reference.
See Also

Reference