Note
Access to this page requires authorization. You can try signing in or changing directories.
Access to this page requires authorization. You can try changing directories.
Registers the types according to the convention.
Namespace: Microsoft.Practices.Unity
Assembly: Microsoft.Practices.Unity (in Microsoft.Practices.Unity.dll) Version: 3.0.0.0 (3.0.1304.0)
Syntax
public static IUnityContainer RegisterTypes(
this IUnityContainer container,
RegistrationConvention convention,
bool overwriteExistingMappings = false
)
'Declaration
<ExtensionAttribute>
Public Shared Function RegisterTypes (
container As IUnityContainer,
convention As RegistrationConvention,
Optional overwriteExistingMappings As Boolean = false
) As IUnityContainer
public:
[ExtensionAttribute]
static IUnityContainer^ RegisterTypes(
IUnityContainer^ container,
RegistrationConvention^ convention,
bool overwriteExistingMappings = false
)
Parameters
- container
Type: Microsoft.Practices.Unity.IUnityContainer
The container to configure.
- convention
Type: Microsoft.Practices.Unity.RegistrationConvention
The convention to determine which types will be registered and how.
- overwriteExistingMappings (Optional)
Type: System.Boolean
truetrue (True in Visual Basic) to overwrite existing mappings; otherwise, falsefalse (False in Visual Basic). Defaults to falsefalse (False in Visual Basic).
Return Value
Type: IUnityContainer
The container that this method was called on.
Usage Note
In Visual Basic and C#, you can call this method as an instance method on any object of type IUnityContainer. 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).
See Also
UnityContainerRegistrationByConventionExtensions Class