UnityBootstrapper.RegisterTypeIfMissing Method
Registers a type in the container only if that type was not already registered.
Namespace: Microsoft.Practices.Composite.UnityExtensions
Assembly: Microsoft.Practices.Composite.UnityExtensions (in Microsoft.Practices.Composite.UnityExtensions.dll)
Syntax
'Declaration
Protected Sub RegisterTypeIfMissing ( _
fromType As Type, _
toType As Type, _
registerAsSingleton As Boolean _
)
protected void RegisterTypeIfMissing(
Type fromType,
Type toType,
bool registerAsSingleton
)
protected:
void RegisterTypeIfMissing(
Type^ fromType,
Type^ toType,
bool registerAsSingleton
)
function registerTypeIfMissing(fromType, toType, registerAsSingleton);
Parameters
- fromType
Type: System.Type
The interface type to register.
- toType
Type: System.Type
The type implementing the interface.
- registerAsSingleton
Type: System.Boolean
Registers the type as a singleton.