CommandSet.RegisterCommandAsync 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.
Overloads
RegisterCommandAsync(Type) |
Registers a command defined by the provided type. This is only for commands that are also registered in extension.json. |
RegisterCommandAsync<T>() |
Registers a command from a given type. This is only for commands that are also registered in extension.json. |
RegisterCommandAsync(Type)
Registers a command defined by the provided type. This is only for commands that are also registered in extension.json.
public System.Threading.Tasks.Task<Microsoft.VisualStudio.Extensibility.Commands.Command> RegisterCommandAsync (Type commandType);
member this.RegisterCommandAsync : Type -> System.Threading.Tasks.Task<Microsoft.VisualStudio.Extensibility.Commands.Command>
Public Function RegisterCommandAsync (commandType As Type) As Task(Of Command)
Parameters
- commandType
- Type
Type of the command to register.
Returns
Created command instance.
Applies to
RegisterCommandAsync<T>()
Registers a command from a given type. This is only for commands that are also registered in extension.json.
public System.Threading.Tasks.Task<T> RegisterCommandAsync<T> () where T : Microsoft.VisualStudio.Extensibility.Commands.Command;
member this.RegisterCommandAsync : unit -> System.Threading.Tasks.Task<'T (requires 'T :> Microsoft.VisualStudio.Extensibility.Commands.Command)> (requires 'T :> Microsoft.VisualStudio.Extensibility.Commands.Command)
Public Function RegisterCommandAsync(Of T As Command) () As Task(Of T)
Type Parameters
- T
Type of the command to register.
Returns
Created command instance.