Compartir a través de


DynamicCommand Class

Definition

Class representing a command that is created at runtime without static metadata associated with it.

public class DynamicCommand : Microsoft.VisualStudio.Extensibility.Commands.ExecutableCommandHandler, Microsoft.VisualStudio.Extensibility.Commands.IDynamicCommand, System.ComponentModel.INotifyPropertyChanged
type DynamicCommand = class
    inherit ExecutableCommandHandler
    interface IDynamicCommand
    interface IToggleCommand
    interface IExecutableCommand
    interface ICommand
    interface INotifyPropertyChanged
Public Class DynamicCommand
Inherits ExecutableCommandHandler
Implements IDynamicCommand, INotifyPropertyChanged
Inheritance
Implements

Constructors

DynamicCommand(VisualStudioExtensibility, CommandMetadata, CommandCallbackAsync)

Initializes a new instance of the DynamicCommand class.

Properties

DisableDuringExecution

Gets or sets a value indicating whether command should be disabled when it is executing to avoid multiple invocations at the same time.

(Inherited from ExecutableCommandHandler)
DisplayName

Gets the display name for the command, or null if the display name comes from registered metadata.

(Inherited from PlaceholderCommand)
Extensibility

Gets the Visual Studio extensibility point.

(Inherited from ExecutableCommandHandler)
Flags

Gets the flags associated with the command.

(Inherited from PlaceholderCommand)
IconName

Gets the name of the icon that should be associated with this command.

Id

Gets a unique id for this command within its command set.

(Inherited from PlaceholderCommand)
IsChecked

Gets a value indicating whether this command is toggled.

IsDisposed

Gets a value indicating whether this instance has been disposed.

(Inherited from PlaceholderCommand)
IsEnabled

Gets a value indicating whether this command is enabled or disabled.

(Inherited from ExecutableCommandHandler)
IsVisible

Gets a value indicating whether this command is visible or invisible.

(Inherited from PlaceholderCommand)
RelativeDisplayOrder

Gets the relative display order of the command. Used when determining its specific placement.

TooltipText

Gets the tooltip text for the command, or the display name if no tooltip text was provided.

(Inherited from PlaceholderCommand)

Methods

Dispose() (Inherited from PlaceholderCommand)
Dispose(Boolean)

Disposes the command instance.

(Inherited from PlaceholderCommand)
ExecuteCommandAsync(IClientContext, CancellationToken)

Raised when command is executed on the client.

ExecuteCommandAsync(IReadOnlyDictionary<String,Object>, CancellationToken)

Called to invoke the command.

(Inherited from ExecutableCommandHandler)
InitializeAsync(CancellationToken)

Completes async initialization of command instance.

(Inherited from PlaceholderCommand)
OnPropertyChanged(PropertyChangedEventArgs)

Fires PropertyChanged event.

(Inherited from PlaceholderCommand)
SetEnabledState(Nullable<Boolean>)

Set this command as enabled, disabled, or null to determine the enabled state from registered metadata. Setting this value to null will fall back to using the registered metadata context rule if one was provided.

(Inherited from ExecutableCommandHandler)
SetVisibilityState(Nullable<Boolean>)

Set this command as visible, invisible, or null to determine the visibility state from registered metadata. Setting this value to null will fall back to using the registered metadata context rule if one was provided.

(Inherited from PlaceholderCommand)

Events

PropertyChanged (Inherited from PlaceholderCommand)

Applies to