DynamicCommandAnchor.AddCommand(CommandMetadata, CommandCallbackAsync) Method
Definition
Important
Some information relates to prerelease product that may be substantially modified before it’s released. Microsoft makes no warranties, express or implied, with respect to the information provided here.
Register a command instance using command name and handler and anchor it to this group.
public Microsoft.VisualStudio.Extensibility.Commands.IExecutableCommand AddCommand (Microsoft.VisualStudio.RpcContracts.Commands.CommandMetadata metadata, Microsoft.VisualStudio.Extensibility.Commands.CommandCallbackAsync commandHandler);
member this.AddCommand : Microsoft.VisualStudio.RpcContracts.Commands.CommandMetadata * Microsoft.VisualStudio.Extensibility.Commands.CommandCallbackAsync -> Microsoft.VisualStudio.Extensibility.Commands.IExecutableCommand
Public Function AddCommand (metadata As CommandMetadata, commandHandler As CommandCallbackAsync) As IExecutableCommand
Parameters
- metadata
- CommandMetadata
Metadata related to the command that is being registered.
- commandHandler
- CommandCallbackAsync
Command handler.
Returns
Returns the registers command instance to set command state if required.