完成命令处理程序
Completion Command Handler
我在 MSDN 上试用 "Displaying Statement Completion Walkthrough",但无法正确构建它。
在网站上,他们要求构建 TestCompletionCommandHandler class。在实现完成命令处理程序提供程序下。
但是关于实现完成命令处理程序。它要求创建另一个同名的 classname,TestCompletionCommandHandler class。
问题。
- 哪个是正确的 class 名字?
谢谢
这是该网站的引用(我希望你在谈论)
Walkthrough: Displaying Statement Completion
Implementing the Completion Command Handler Provider
To implement the completion command handler provider
- Add a file named TestCompletionCommandHandler.
- Add a class named TestCompletionHandlerProvider that implements
IVsTextViewCreationListener
.
Implementing the Completion Command Handler
To implement the completion command handler
- Add a class named TestCompletionCommandHandler that implements
IOleCommandTarget
:
说明非常明确,您最终应该得到 一个名为 TestCompletionCommandHandler.cs 的文件,其中包含 两个 类 和两个 类 肯定有不同的名字:
[Export(typeof(IVsTextViewCreationListener))]
[Name("token completion handler")]
[ContentType("plaintext")]
[TextViewRole(PredefinedTextViewRoles.Editable)]
internal class TestCompletionHandlerProvider : IVsTextViewCreationListener
{
// implementation
}
internal class TestCompletionCommandHandler : IOleCommandTarget
{
// implementation
}
我在 MSDN 上试用 "Displaying Statement Completion Walkthrough",但无法正确构建它。
在网站上,他们要求构建 TestCompletionCommandHandler class。在实现完成命令处理程序提供程序下。
但是关于实现完成命令处理程序。它要求创建另一个同名的 classname,TestCompletionCommandHandler class。
问题。
- 哪个是正确的 class 名字?
谢谢
这是该网站的引用(我希望你在谈论)
Walkthrough: Displaying Statement Completion
Implementing the Completion Command Handler Provider
To implement the completion command handler provider
- Add a file named TestCompletionCommandHandler.
- Add a class named TestCompletionHandlerProvider that implements
IVsTextViewCreationListener
.Implementing the Completion Command Handler
To implement the completion command handler
- Add a class named TestCompletionCommandHandler that implements
IOleCommandTarget
:
说明非常明确,您最终应该得到 一个名为 TestCompletionCommandHandler.cs 的文件,其中包含 两个 类 和两个 类 肯定有不同的名字:
[Export(typeof(IVsTextViewCreationListener))]
[Name("token completion handler")]
[ContentType("plaintext")]
[TextViewRole(PredefinedTextViewRoles.Editable)]
internal class TestCompletionHandlerProvider : IVsTextViewCreationListener
{
// implementation
}
internal class TestCompletionCommandHandler : IOleCommandTarget
{
// implementation
}