C# Class PReview.CommandFilter

Inheritance: Microsoft.VisualStudio.OLE.Interop.IOleCommandTarget, IDisposable
Afficher le fichier Open project: laurentkempe/PReview

Méthodes publiques

Méthode Description
Dispose ( ) : void

Méthodes protégées

Méthode Description
CommandFilter ( ) : System

Initializes a new instance of the CommandFilter class.

Connect ( ) : Microsoft.VisualStudio.OLE.Interop.IOleCommandTarget

Enables the command filter by connecting it to a chain of command targets.

Do not call this method directly. This method is called as necessary when Enabled is set to .

Disconnect ( ) : void

Disables the command filter by disconnecting it from a chain of command targets.

Do not call this method directly. This method is called as necessary when Enabled is set to .

Dispose ( bool disposing ) : void

Releases the unmanaged resources used by this instance.

When disposing is , the default implementation sets Enabled to .

HandlePostExec ( System.Guid &commandGroup, uint commandId, Microsoft.VisualStudio.OLE.Interop.OLECMDEXECOPT executionOptions, IntPtr pvaIn, IntPtr pvaOut ) : void

This method supports specialized handling in response to commands that are successfully handled by another command target.

This method is only called if HandlePreExec for the current instance returned and the next command target in the chain returned a value indicating the command execution succeeded.

The default implementation is empty.

HandlePreExec ( System.Guid &commandGroup, uint commandId, Microsoft.VisualStudio.OLE.Interop.OLECMDEXECOPT executionOptions, IntPtr pvaIn, IntPtr pvaOut ) : bool

This method supports the implementation for commands which are directly implemented by this command filter.

The default implementation returns for all commands.

QueryCommandStatus ( System.Guid &commandGroup, uint commandId ) : Microsoft.VisualStudio.OLE.Interop.OLECMDF

Gets the current status of a particular command.

The base implementation returns 0 for all commands, indicating the command is not supported by this command filter.

QueryParameterList ( System.Guid &commandGroup, uint commandId, Microsoft.VisualStudio.OLE.Interop.OLECMDEXECOPT executionOptions, IntPtr pvaIn, IntPtr pvaOut ) : int
ThrowIfDisposed ( ) : void

Throw an ObjectDisposedException if the current instance has been disposed.

Private Methods

Méthode Description
ExecCommand ( System.Guid &guidCmdGroup, uint nCmdID, Microsoft.VisualStudio.OLE.Interop.OLECMDEXECOPT nCmdexecopt, IntPtr pvaIn, IntPtr pvaOut ) : int
IOleCommandTarget ( System.Guid &guidCmdGroup, uint cCmds, Microsoft.VisualStudio.OLE.Interop.OLECMD prgCmds, IntPtr pCmdText ) : int
IOleCommandTarget ( System.Guid &guidCmdGroup, uint nCmdID, uint nCmdexecopt, IntPtr pvaIn, IntPtr pvaOut ) : int
InnerExec ( System.Guid &commandGroup, uint commandId, Microsoft.VisualStudio.OLE.Interop.OLECMDEXECOPT executionOptions, IntPtr pvaIn, IntPtr pvaOut ) : int

Method Details

CommandFilter() protected méthode

Initializes a new instance of the CommandFilter class.
protected CommandFilter ( ) : System
Résultat System

Connect() protected abstract méthode

Enables the command filter by connecting it to a chain of command targets.
Do not call this method directly. This method is called as necessary when Enabled is set to .
protected abstract Connect ( ) : Microsoft.VisualStudio.OLE.Interop.IOleCommandTarget
Résultat Microsoft.VisualStudio.OLE.Interop.IOleCommandTarget

Disconnect() protected abstract méthode

Disables the command filter by disconnecting it from a chain of command targets.
Do not call this method directly. This method is called as necessary when Enabled is set to .
protected abstract Disconnect ( ) : void
Résultat void

Dispose() public méthode

public Dispose ( ) : void
Résultat void

Dispose() protected méthode

Releases the unmanaged resources used by this instance.
When disposing is , the default implementation sets Enabled to .
protected Dispose ( bool disposing ) : void
disposing bool if this method is being called from ; otherwise, if this method is being called from a finalizer.
Résultat void

HandlePostExec() protected méthode

This method supports specialized handling in response to commands that are successfully handled by another command target.
This method is only called if HandlePreExec for the current instance returned and the next command target in the chain returned a value indicating the command execution succeeded.

The default implementation is empty.

protected HandlePostExec ( System.Guid &commandGroup, uint commandId, Microsoft.VisualStudio.OLE.Interop.OLECMDEXECOPT executionOptions, IntPtr pvaIn, IntPtr pvaOut ) : void
commandGroup System.Guid The command group.
commandId uint The command ID.
executionOptions Microsoft.VisualStudio.OLE.Interop.OLECMDEXECOPT The OLE command execution options.
pvaIn System.IntPtr An optional pointer to the command argument(s). The semantics of this parameter are specific to a particular command.
pvaOut System.IntPtr An optional pointer to the command result(s). The semantics of this parameter are specific to a particular command.
Résultat void

HandlePreExec() protected méthode

This method supports the implementation for commands which are directly implemented by this command filter.
The default implementation returns for all commands.
protected HandlePreExec ( System.Guid &commandGroup, uint commandId, Microsoft.VisualStudio.OLE.Interop.OLECMDEXECOPT executionOptions, IntPtr pvaIn, IntPtr pvaOut ) : bool
commandGroup System.Guid The command group.
commandId uint The command ID.
executionOptions Microsoft.VisualStudio.OLE.Interop.OLECMDEXECOPT The OLE command execution options.
pvaIn System.IntPtr An optional pointer to the command argument(s). The semantics of this parameter are specific to a particular command.
pvaOut System.IntPtr An optional pointer to the command result(s). The semantics of this parameter are specific to a particular command.
Résultat bool

QueryCommandStatus() protected méthode

Gets the current status of a particular command.
The base implementation returns 0 for all commands, indicating the command is not supported by this command filter.
protected QueryCommandStatus ( System.Guid &commandGroup, uint commandId ) : Microsoft.VisualStudio.OLE.Interop.OLECMDF
commandGroup System.Guid The command group.
commandId uint The command ID.
Résultat Microsoft.VisualStudio.OLE.Interop.OLECMDF

QueryParameterList() protected méthode

protected QueryParameterList ( System.Guid &commandGroup, uint commandId, Microsoft.VisualStudio.OLE.Interop.OLECMDEXECOPT executionOptions, IntPtr pvaIn, IntPtr pvaOut ) : int
commandGroup System.Guid
commandId uint
executionOptions Microsoft.VisualStudio.OLE.Interop.OLECMDEXECOPT
pvaIn System.IntPtr
pvaOut System.IntPtr
Résultat int

ThrowIfDisposed() protected méthode

Throw an ObjectDisposedException if the current instance has been disposed.
If the current instance has been disposed.
protected ThrowIfDisposed ( ) : void
Résultat void