public static void Register(IVsTextView interopTextView, IWpfTextView textView, Services services) { var dispatcher = new StandardCommandDispatcher(); dispatcher._textView = textView; dispatcher._services = services; interopTextView.AddCommandFilter(dispatcher, out dispatcher._commandChain); }