C# Class Tp.Integration.Ide.VisualStudio.Connect

The object for implementing an Add-in.
Inheritance: IDTExtensibility2, IDTCommandTarget
显示文件 Open project: TargetProcess/Tp.Integration.Ide.VisualStudio Class Usage Examples

Public Methods

Method Description
Exec ( string commandName, vsCommandExecOption executeOption, object &varIn, object &varOut, bool &handled ) : void

Implements the Exec method of the IDTCommandTarget interface. This is called when the command is invoked.

OnAddInsUpdate ( Array &custom ) : void

Receives notification when the collection of Add-ins has changed.

OnBeginShutdown ( Array &custom ) : void

Receives notification that the host application is being unloaded.

OnConnection ( object application, ext_ConnectMode connectMode, object addIn, Array &custom ) : void

Implements the OnConnection method of the IDTExtensibility2 interface. Receives notification that the Add-in is being loaded.

OnDisconnection ( ext_DisconnectMode disconnectMode, Array &custom ) : void

Receives notification that the Add-in is being unloaded.

OnStartupComplete ( Array &custom ) : void

Implements the OnStartupComplete method of the IDTExtensibility2 interface. Receives notification that the host application has completed loading.

QueryStatus ( string commandName, vsCommandStatusTextWanted neededText, vsCommandStatus &status, object &commandText ) : void

Implements the QueryStatus method of the IDTCommandTarget interface. This is called when the command's availability is updated.

Private Methods

Method Description
CreateCommand ( CommandBar commandBar, string name, string text, string tooltip ) : void

Adds named command to the TargetProcess popup menu.

CreateCommands ( ) : void

Creates TargetProcess popup menu with commands.

CreateController ( ) : Controller

Creates controller behind the To Do list view.

CreateToolWindow ( ) : void

Create tool window with the To Do list.

CreateTraceListener ( ) : TraceListener

Creates TraceListener which appends to Output Window.

DoExec ( string commandName, vsCommandExecOption executeOption ) : bool
DoQueryStatus ( string commandName, vsCommandStatusTextWanted neededText ) : vsCommandStatus
FindMenuBarControl ( CommandBar menuBarCommandBar, string controlName ) : CommandBarPopup
OnConnectionStateChange ( object sender, ConnectionStateEventArgs e ) : void

Receives notification that the connection state has changed.

Method Details

Exec() public method

Implements the Exec method of the IDTCommandTarget interface. This is called when the command is invoked.
public Exec ( string commandName, vsCommandExecOption executeOption, object &varIn, object &varOut, bool &handled ) : void
commandName string /// The name of the command to execute. ///
executeOption vsCommandExecOption /// Describes how the command should be run. ///
varIn object /// Parameters passed from the caller to the command handler. ///
varOut object /// Parameters passed from the command handler to the caller. ///
handled bool /// Informs the caller if the command was handled or not. ///
return void

OnAddInsUpdate() public method

Receives notification when the collection of Add-ins has changed.
public OnAddInsUpdate ( Array &custom ) : void
custom System.Array /// Array of parameters that are host application specific. ///
return void

OnBeginShutdown() public method

Receives notification that the host application is being unloaded.
public OnBeginShutdown ( Array &custom ) : void
custom System.Array /// Array of parameters that are host application specific. ///
return void

OnConnection() public method

Implements the OnConnection method of the IDTExtensibility2 interface. Receives notification that the Add-in is being loaded.
public OnConnection ( object application, ext_ConnectMode connectMode, object addIn, Array &custom ) : void
application object /// Root object of the host application. ///
connectMode ext_ConnectMode /// Describes how the Add-in is being loaded. ///
addIn object /// Object representing this Add-in. ///
custom System.Array /// Array of parameters that are host application specific. ///
return void

OnDisconnection() public method

Receives notification that the Add-in is being unloaded.
public OnDisconnection ( ext_DisconnectMode disconnectMode, Array &custom ) : void
disconnectMode ext_DisconnectMode /// Describes how the Add-in is being unloaded. ///
custom System.Array /// Array of parameters that are host application specific. ///
return void

OnStartupComplete() public method

Implements the OnStartupComplete method of the IDTExtensibility2 interface. Receives notification that the host application has completed loading.
public OnStartupComplete ( Array &custom ) : void
custom System.Array /// Array of parameters that are host application specific. ///
return void

QueryStatus() public method

Implements the QueryStatus method of the IDTCommandTarget interface. This is called when the command's availability is updated.
public QueryStatus ( string commandName, vsCommandStatusTextWanted neededText, vsCommandStatus &status, object &commandText ) : void
commandName string /// The name of the command to determine state for. ///
neededText vsCommandStatusTextWanted /// Text that is needed for the command. ///
status vsCommandStatus /// The state of the command in the user interface. ///
commandText object /// Text requested by the neededText parameter. ///
return void