Jaa


IUnityContainer.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
Function AddNewExtension(Of TExtension As {New, UnityContainerExtension}) As IUnityContainer
IUnityContainer AddNewExtension<TExtension>()
where TExtension : new(), UnityContainerExtension
generic<typename TExtension>
where TExtension : gcnew(), UnityContainerExtension
IUnityContainer^ AddNewExtension()
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).

See Also

IUnityContainer Interface

Microsoft.Practices.Unity Namespace