IEditorCommandHandlerService.GetCommandState<T> 方法
定义
重要
一些信息与预发行产品相关,相应产品在发行之前可能会进行重大修改。 对于此处提供的信息,Microsoft 不作任何明示或暗示的担保。
获取 CommandState 给定命令的的命令处理程序。
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
类型参数
- T
正在查询的命令的类型。
参数
- argsFactory
- Func<ITextView,ITextBuffer,T>
EditorCommandArgs用于指定正在查询的命令类型的的工厂。
- nextCommandHandler
- Func<CommandState>
如果没有命令处理程序能够确定命令状态,则将调用下一个命令处理程序。
返回
给定命令的命令状态。