Package.GetAutomationObject Method (String)
Gets the automation object for the VSPackage.
Assembly: Microsoft.VisualStudio.Shell.14.0 (in Microsoft.VisualStudio.Shell.14.0.dll)
abstract GetAutomationObject : name:string -> Object override GetAutomationObject : name:string -> Object
Parameters
- name
-
Type:
System.String
The name of the automation object to return. If name is null, GetAutomationObject returns the default automation object for the VSPackage.
Return Value
Type: System.ObjectAn instance of the automation object, or null if no automation support is available.
| Exception | Condition |
|---|---|
| NotImplementedException | Thrown by the base implementation of GetAutomationObject. |
Override GetAutomationObject when your VSPackage extends the DTE Automation object model.
The GetAutomationObject method returns null if name is null, indicating there is no default automation object. (This causes the IVsPackage implementation to return E_NOTIMPL.)
If name is not null, this method searches through the available metadata attributes for an option page with a name that matches the format <Category>.<Name>. If the option page has such a name and indicates that it supports automation, the automation object in the option page is returned.