Freigeben über


Source.ExecMarkerCommand Method

Executes the specified command on the specified region.

Namespace:  Microsoft.VisualStudio.Package
Assemblies:   Microsoft.VisualStudio.Package.LanguageService.12.0 (in Microsoft.VisualStudio.Package.LanguageService.12.0.dll)
  Microsoft.VisualStudio.Package.LanguageService.10.0 (in Microsoft.VisualStudio.Package.LanguageService.10.0.dll)
  Microsoft.VisualStudio.Package.LanguageService.11.0 (in Microsoft.VisualStudio.Package.LanguageService.11.0.dll)
  Microsoft.VisualStudio.Package.LanguageService.9.0 (in Microsoft.VisualStudio.Package.LanguageService.9.0.dll)
  Microsoft.VisualStudio.Package.LanguageService (in Microsoft.VisualStudio.Package.LanguageService.dll)

Syntax

'Declaration
Public Overridable Function ExecMarkerCommand ( _
    region As IVsHiddenRegion, _
    cmd As Integer _
) As Integer
public virtual int ExecMarkerCommand(
    IVsHiddenRegion region,
    int cmd
)
public:
virtual int ExecMarkerCommand(
    IVsHiddenRegion^ region, 
    int cmd
)
abstract ExecMarkerCommand : 
        region:IVsHiddenRegion * 
        cmd:int -> int  
override ExecMarkerCommand : 
        region:IVsHiddenRegion * 
        cmd:int -> int
public function ExecMarkerCommand(
    region : IVsHiddenRegion, 
    cmd : int
) : int

Parameters

  • cmd
    Type: Int32

    A value from the MarkerCommandValues enumeration specifying the command to execute.

Return Value

Type: Int32
If successful, returns S_OK; otherwise, returns an error code. If support for commands on a hidden region is not needed, returns E_NOTIMPL.

Implements

IVsHiddenTextClient.ExecMarkerCommand(IVsHiddenRegion, Int32)

Remarks

When a user right-clicks on a hidden region marker, a context menu is displayed. The GetMarkerCommandInfo method is called to obtain the commands to display on the menu. When the user selects a command from the menu, the ExecMarkerCommand method is called. Only the commands from the MarkerCommandValues enumeration can be supported in this way.

The base method always returns E_NOTIMPL.

.NET Framework Security

See Also

Reference

Source Class

Microsoft.VisualStudio.Package Namespace