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.10.2
Syntax

[ObsoleteAttribute("Please use RegisterPackages(Container, IEnumerable<Assembly>) instead. Will be removed in version 5.0.", 
	true)]
[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