Share via


IEditorCommandHandlerService.GetCommandState<T> Method

Definition

Get the CommandState for command handlers of a given command.

public:
generic <typename T>
 where T : Microsoft::VisualStudio::Text::Editor::Commanding::EditorCommandArgs Microsoft::VisualStudio::Commanding::CommandState GetCommandState(Func<Microsoft::VisualStudio::Text::Editor::ITextView ^, Microsoft::VisualStudio::Text::ITextBuffer ^, T> ^ argsFactory, Func<Microsoft::VisualStudio::Commanding::CommandState> ^ nextCommandHandler);
public Microsoft.VisualStudio.Commanding.CommandState GetCommandState<T> (Func<Microsoft.VisualStudio.Text.Editor.ITextView,Microsoft.VisualStudio.Text.ITextBuffer,T> argsFactory, Func<Microsoft.VisualStudio.Commanding.CommandState> nextCommandHandler) where T : Microsoft.VisualStudio.Text.Editor.Commanding.EditorCommandArgs;
abstract member GetCommandState : Func<Microsoft.VisualStudio.Text.Editor.ITextView, Microsoft.VisualStudio.Text.ITextBuffer, 'T (requires 'T :> Microsoft.VisualStudio.Text.Editor.Commanding.EditorCommandArgs)> * Func<Microsoft.VisualStudio.Commanding.CommandState> -> Microsoft.VisualStudio.Commanding.CommandState (requires 'T :> Microsoft.VisualStudio.Text.Editor.Commanding.EditorCommandArgs)
Public Function GetCommandState(Of T As EditorCommandArgs) (argsFactory As Func(Of ITextView, ITextBuffer, T), nextCommandHandler As Func(Of CommandState)) As CommandState

Type Parameters

T

The type of the command being queried.

Parameters

argsFactory
Func<ITextView,ITextBuffer,T>

A factory of EditorCommandArgs that specifies what kind of command is being queried.

nextCommandHandler
Func<CommandState>

The next command handler to be called if no command handlers were able to determine the command state.

Returns

The command state of a given command.

Applies to