Source.ExecMarkerCommand Method
Executes the specified command on the specified region.
Namespace: Microsoft.VisualStudio.Package
Assemblies: Microsoft.VisualStudio.Package.LanguageService.10.0 (in Microsoft.VisualStudio.Package.LanguageService.10.0.dll)
Microsoft.VisualStudio.Package.LanguageService (in Microsoft.VisualStudio.Package.LanguageService.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)
Syntax
'Declaração
Public Overridable Function ExecMarkerCommand ( _
region As IVsHiddenRegion, _
cmd As Integer _
) As Integer
public virtual int ExecMarkerCommand(
IVsHiddenRegion region,
int cmd
)
Parameters
- region
Type: Microsoft.VisualStudio.TextManager.Interop.IVsHiddenRegion
An IVsHiddenRegion object representing the hidden region to apply the command to.
- cmd
Type: System.Int32
A value from the MarkerCommandValues enumeration specifying the command to execute.
Return Value
Type: System.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
- Full trust for the immediate caller. This member cannot be used by partially trusted code. For more information, see Using Libraries from Partially Trusted Code.