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.6, 4.5, 4, 3.5

.NET Framework Client Profile

Supported in: 4, 3.5 SP1
Was this page helpful?
(1500 characters remaining)
Thank you for your feedback
Show:
© 2015 Microsoft