Export (0) Print
Expand All

AddInController.Shutdown Method

Disables an add-in.

Namespace:  System.AddIn.Hosting
Assembly:  System.AddIn (in System.AddIn.dll)

public void Shutdown()

This method breaks the communication pipeline between an add-in and its host. If the add-in was activated in an automatically generated application domain by using the Activate<T>(AddInSecurityLevel) or Activate<T>(PermissionSet) methods, the Shutdown method also unloads the application domain.

If the add-in was loaded into its own application domain, the Shutdown method also unloads the application domain.

If the add-in was loaded into an existing application domain, the host and pipeline segments will no longer have any references to that add-in. In this case, the add-in will be eligible to be reclaimed by garbage collection.

You can also use this class to shut down an add-in that is activated in an external process.

The following example obtains the AddInController object for a host view named manager and then shuts down the add-in.

AddInController ctrl = AddInController.GetAddInController(manager);
ctrl.Shutdown();

.NET Framework

Supported in: 4.5.2, 4.5.1, 4.5, 4, 3.5

.NET Framework Client Profile

Supported in: 4, 3.5 SP1

Windows 8.1, Windows Server 2012 R2, Windows 8, Windows Server 2012, Windows 7, Windows Vista SP2, Windows Server 2008 (Server Core Role not supported), Windows Server 2008 R2 (Server Core Role supported with SP1 or later; Itanium not supported)

The .NET Framework does not support all versions of every platform. For a list of the supported versions, see .NET Framework System Requirements.

Show:
© 2014 Microsoft