PackageExtensionsRegisterPackages Method (Container)

Simple Injector

Note: This API is now obsolete.

Loads all IPackage implementations from assemblies that are currently loaded in the current AppDomain, and calls their Register method. Note that only publicly exposed classes that contain a public default constructor will be loaded. Note that this method will only pick up assemblies that are loaded at that moment in time. A more reliable way of registering packages is by explicitly supplying the list of assemblies using the RegisterPackages(Container, IEnumerableAssembly) overload.

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

[ObsoleteAttribute("RegisterPackages has been deprecated. Please use RegisterPackages(Container, IEnumerable<Assembly>) instead.", 
	false)]
[EditorBrowsableAttribute(EditorBrowsableState.Never)]
public static void RegisterPackages(
	this Container container
)

Parameters

container
Type: SimpleInjectorContainer
The container to which the packages will be applied to.

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