Freigeben über


UnityContainerBase.AddNewExtension<TExtension> Method

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.

Creates a new extension object and adds it to the container.

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

Syntax

'Declaration
Public Function AddNewExtension(Of TExtension As {New, UnityContainerExtension}) As IUnityContainer
public IUnityContainer AddNewExtension<TExtension>()
where TExtension : new(), UnityContainerExtension
public:
generic<typename TExtension>
where TExtension : gcnew(), UnityContainerExtension
virtual IUnityContainer^ AddNewExtension() sealed
JScript does not support generic types or methods.

Type Parameters

  • TExtension
    Type of UnityContainerExtension to add. The extension type must have a zero-argument public constructor.

Return Value

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

Implements

IUnityContainer.AddNewExtension<TExtension>()

See Also

UnityContainerBase Class

Microsoft.Practices.Unity Namespace