Partager via


UnityContainer.RemoveAllExtensions 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.

Remove all installed extensions from this container.

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

Syntax

'Declaration
Public Overrides Function RemoveAllExtensions As IUnityContainer
public override IUnityContainer RemoveAllExtensions()
public:
virtual IUnityContainer^ RemoveAllExtensions() override
public override function RemoveAllExtensions() : IUnityContainer

Return Value

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

Implements

IUnityContainer.RemoveAllExtensions()

Remarks

This method removes all extensions from the container, including the default ones that implement the out-of-the-box behavior. After this method, if you want to use the container again you will need to either readd the default extensions or replace them with your own.

The registered instances and singletons that have already been set up in this container do not get removed.

See Also

UnityContainer Class

Microsoft.Practices.Unity Namespace