예제 #1
0
        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...");
        }
예제 #2
0
 public static XAMLatorMonitor Init(IIDE ide)
 {
     Instance = new XAMLatorMonitor(ide);
     return(Instance);
 }
예제 #3
0
 protected override void Run()
 {
     XAMLatorMonitor.Init(new MonoDevelopIDE());
     XAMLatorMonitor.Instance.StartMonitoring();
 }