共用方式為


IVsTextMarkerClient.ExecMarkerCommand Method

Executes a command on a specific marker within the text buffer.

Namespace:  Microsoft.VisualStudio.TextManager.Interop
Assembly:  Microsoft.VisualStudio.TextManager.Interop (in Microsoft.VisualStudio.TextManager.Interop.dll)

Syntax

'宣告
Function ExecMarkerCommand ( _
    pMarker As IVsTextMarker, _
    iItem As Integer _
) As Integer
int ExecMarkerCommand(
    IVsTextMarker pMarker,
    int iItem
)
int ExecMarkerCommand(
    [InAttribute] IVsTextMarker^ pMarker, 
    [InAttribute] int iItem
)
abstract ExecMarkerCommand : 
        pMarker:IVsTextMarker * 
        iItem:int -> int 
function ExecMarkerCommand(
    pMarker : IVsTextMarker, 
    iItem : int
) : int

Parameters

Return Value

Type: System.Int32
If the method succeeds, it returns S_OK. If it fails, it returns an error code.

Remarks

COM Signature

From textmgr.idl:

HRESULT IVsTextMarkerClient::ExecMarkerCommand(
   [in] IVsTextMarker* pMarker,
   [in] long iItem
);

Implement this method along with GetMarkerCommandInfo to override the marker commands that the text marker itself provides to the context menu.

.NET Framework Security

See Also

Reference

IVsTextMarkerClient Interface

Microsoft.VisualStudio.TextManager.Interop Namespace