public ActiveDocumentLocator([Import(typeof(SVsServiceProvider))] IServiceProvider serviceProvider, ITextDocumentProvider textDocumentProvider) { this.textDocumentProvider = textDocumentProvider; RunOnUIThread.Run(() => { monitorSelection = serviceProvider.GetService(typeof(SVsShellMonitorSelection)) as IVsMonitorSelection; }); }
public ActiveDocumentTracker([Import(typeof(SVsServiceProvider))] IServiceProvider serviceProvider, ITextDocumentProvider textDocumentProvider) { this.textDocumentProvider = textDocumentProvider; RunOnUIThread.Run(() => { monitorSelection = serviceProvider.GetService(typeof(SVsShellMonitorSelection)) as IVsMonitorSelection; monitorSelection.AdviseSelectionEvents(this, out cookie); }); }