Share via


UnityContainerBase.RegisterType Method (Type, String, LifetimeManager, array<InjectionMember[])

Retired Content

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.

RegisterType a LifetimeManager for the given type and name with the container. No type mapping is performed for this type.

Namespace:  Microsoft.Practices.Unity
Assembly:  Microsoft.Practices.Unity (in Microsoft.Practices.Unity.dll)

Syntax

'Declaration
Public Function RegisterType ( _
    t As Type, _
    name As String, _
    lifetimeManager As LifetimeManager, _
    ParamArray injectionMembers As InjectionMember() _
) As IUnityContainer
public IUnityContainer RegisterType(
    Type t,
    string name,
    LifetimeManager lifetimeManager,
    params InjectionMember[] injectionMembers
)
public:
virtual IUnityContainer^ RegisterType(
    Type^ t, 
    String^ name, 
    LifetimeManager^ lifetimeManager, 
    ... array<InjectionMember^>^ injectionMembers
) sealed
public final function RegisterType(
    t : Type, 
    name : String, 
    lifetimeManager : LifetimeManager, 
    ... injectionMembers : InjectionMember[]
) : IUnityContainer

Parameters

  • name
    Type: System.String
    Name to use for registration, null if a default registration.

Return Value

The UnityContainer object that this method was called on (this in C#, Me in Visual Basic).

Implements

IUnityContainer.RegisterType(Type, String, LifetimeManager, array<InjectionMember[])

See Also

UnityContainerBase Class

RegisterType Overload

Microsoft.Practices.Unity Namespace