IUnityContainer.RegisterType Method (Type, Type, String, LifetimeManager, array<InjectionMember)
This content is outdated and is no longer being maintained. It is provided as a courtesy for individuals who are still using these technologies. This page may contain URLs that were valid when originally published, but now link to sites or pages that no longer exist.
|The latest Unity Application Block information can be found at the Unity Application Block site.|
Register a type mapping with the container, where the created instances will use the given LifetimeManager.
Assembly: Microsoft.Practices.Unity (in Microsoft.Practices.Unity.dll)
'Declaration Function RegisterType ( _ from As Type, _ to As Type, _ name As String, _ lifetimeManager As LifetimeManager, _ ParamArray injectionMembers As InjectionMember() _ ) As IUnityContainer
IUnityContainer RegisterType( Type from, Type to, string name, LifetimeManager lifetimeManager, params InjectionMember injectionMembers )
IUnityContainer^ RegisterType( Type^ from, Type^ to, String^ name, LifetimeManager^ lifetimeManager, ... array<InjectionMember^>^ injectionMembers )
function RegisterType( from : Type, to : Type, name : String, lifetimeManager : LifetimeManager, ... injectionMembers : InjectionMember ) : IUnityContainer
Name to use for registration, null if a default registration.
The LifetimeManager that controls the lifetime of the returned instance.
Injection configuration objects.
The UnityContainer object that this method was called on (this in C#, Me in Visual Basic).