protected override async Task InitializeAsync(CancellationToken cancellationToken, IProgress <ServiceProgressData> progress) { IComponentModel componentModel = (IComponentModel)(await GetServiceAsync(typeof(SComponentModel))); RunningDocTableEvents runningDocTableEventListener = new RunningDocTableEvents(); await JoinableTaskFactory.SwitchToMainThreadAsync(cancellationToken); IVsRunningDocumentTable iVsRunningDocumentTable = (IVsRunningDocumentTable)GetGlobalService(typeof(SVsRunningDocumentTable)); iVsRunningDocumentTable.AdviseRunningDocTableEvents(runningDocTableEventListener, out uint mRdtCookie); DocumentService documentService = new DocumentService(iVsRunningDocumentTable, runningDocTableEventListener, componentModel.GetService <VisualStudioWorkspace>()); OutputWindowHelper.LogWriteLine("XAMLator initialized."); VisualStudioIDE visualStudioIDE = new VisualStudioIDE(documentService); XAMLatorMonitor.Init(visualStudioIDE); XAMLatorMonitor.Instance.StartMonitoring(); OutputWindowHelper.LogWriteLine("XAMLator Start monitoring..."); }
public static XAMLatorMonitor Init(IIDE ide) { Instance = new XAMLatorMonitor(ide); return(Instance); }
protected override void Run() { XAMLatorMonitor.Init(new MonoDevelopIDE()); XAMLatorMonitor.Instance.StartMonitoring(); }