Export (0) Print
Expand All

Package.GetAutomationObject Method

Gets the automation object for the VSPackage.

Namespace:  Microsoft.VisualStudio.Shell
Assembly:  Microsoft.VisualStudio.Shell.10.0 (in Microsoft.VisualStudio.Shell.10.0.dll)

protected virtual Object GetAutomationObject(
	string name
)

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.Object
An instance of the automation object, or null if no automation support is available.

ExceptionCondition
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.

Community Additions

ADD
Show:
© 2014 Microsoft