Initializes a new instance of the CommandContextBoundMenuCommand class.
Namespace:  Microsoft.VisualStudio.Modeling.Shell
Assembly:  Microsoft.VisualStudio.Modeling.Sdk.Shell.10.0 (in Microsoft.VisualStudio.Modeling.Sdk.Shell.10.0.dll)
Syntax
声明
Public Sub New ( _
    serviceProvider As IServiceProvider, _
    handler As EventHandler, _
    id As CommandID, _
    ParamArray commandContext As Guid() _
)
public CommandContextBoundMenuCommand(
    IServiceProvider serviceProvider,
    EventHandler handler,
    CommandID id,
    params Guid[] commandContext
)
public:
CommandContextBoundMenuCommand(
    IServiceProvider^ serviceProvider, 
    EventHandler^ handler, 
    CommandID^ id, 
    ... array<Guid>^ commandContext
)
new : 
        serviceProvider:IServiceProvider * 
        handler:EventHandler * 
        id:CommandID * 
        commandContext:Guid[] -> CommandContextBoundMenuCommand
public function CommandContextBoundMenuCommand(
    serviceProvider : IServiceProvider, 
    handler : EventHandler, 
    id : CommandID, 
    ... commandContext : Guid[]
)
Parameters
- serviceProvider
Type: System.IServiceProvider
The service provider that retrieves Visual Studio services. 
- handler
Type: System.EventHandler
The event handler that executes the command. 
- id
Type: System.ComponentModel.Design.CommandID
The command ID that is assigned to the menu command. 
- commandContext
Type: array<System.Guid[]
The GUID(s) that indicate the command context to which this command is assigned. 
.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.