protected override async Task InitializeAsync(CancellationToken cancellationToken, IProgress <ServiceProgressData> progress) { _dte = await GetServiceAsync(typeof(DTE)) as DTE2; await JoinableTaskFactory.SwitchToMainThreadAsync(cancellationToken); _instance = this; _dispatcher = Dispatcher.CurrentDispatcher; Package = this; Options = (Options)GetDialogPage(typeof(Options)); Logger.Initialize(this, Vsix.Name); Events2 events = _dte.Events as Events2; _solutionEvents = events.SolutionEvents; _solutionEvents.AfterClosing += () => { ErrorList.CleanAllErrors(); }; _solutionEvents.ProjectRemoved += (project) => { ErrorList.CleanAllErrors(); }; CreateBundle.Initialize(this); UpdateBundle.Initialize(this); UpdateAllFiles.Initialize(this); BundleOnBuild.Initialize(this); RemoveBundle.Initialize(this); ClearOutputFiles.Initialize(this); ToggleProduceOutput.Initialize(this); OpenSettings.Initialize(this); ProjectEventCommand.Initialize(this); ConvertToGulp.Initialize(this); }
protected override void Initialize() { _instance = this; _dte = GetService(typeof(DTE)) as DTE2; _dispatcher = Dispatcher.CurrentDispatcher; Package = this; Options = (Options)GetDialogPage(typeof(Options)); Logger.Initialize(this, Vsix.Name); Events2 events = _dte.Events as Events2; _solutionEvents = events.SolutionEvents; _solutionEvents.AfterClosing += () => { ErrorList.CleanAllErrors(); }; _solutionEvents.ProjectRemoved += (project) => { ErrorList.CleanAllErrors(); }; CreateBundle.Initialize(this); UpdateBundle.Initialize(this); UpdateAllFiles.Initialize(this); BundleOnBuild.Initialize(this); RemoveBundle.Initialize(this); ClearOutputFiles.Initialize(this); ToggleProduceOutput.Initialize(this); OpenSettings.Initialize(this); ProjectEventCommand.Initialize(this); ConvertToGulp.Initialize(this); base.Initialize(); }