leonard chan leonard chan - 1 year ago 129
C# Question

Completion Command Handler

I was trying out the "Displaying Statement Completion Walkthrough" on MSDN but am unable to build it without error.

On the site they asked to build TestCompletionCommandHandler class. Under Implementing The Completion Command Handler Provider.

However on Implementing the Completion Command Handler. It asked to create another classname by the same name, TestCompletionCommandHandler class.


  1. Which is the correct class name?

Thank you

Answer Source

Here is a cite from the site (I hope you are talking about)

Walkthrough: Displaying Statement Completion

Implementing the Completion Command Handler Provider

To implement the completion command handler provider

  1. Add a file named TestCompletionCommandHandler.
  2. Add a class named TestCompletionHandlerProvider that implements IVsTextViewCreationListener.

Implementing the Completion Command Handler

To implement the completion command handler

  1. Add a class named TestCompletionCommandHandler that implements IOleCommandTarget:

The instruction is very clear that you should end up with one file named TestCompletionCommandHandler.cs containing two classes and both classes have for sure different names:

[Name("token completion handler")]
internal class TestCompletionHandlerProvider : IVsTextViewCreationListener
    // implementation

internal class TestCompletionCommandHandler : IOleCommandTarget
   // implementation 
Recommended from our users: Dynamic Network Monitoring from WhatsUp Gold from IPSwitch. Free Download