protected override async Task InitializeAsync(CancellationToken cancellationToken, IProgress <ServiceProgressData> progress) { await base.InitializeAsync(cancellationToken, progress); RegisterLanguageService(); RegisterIcons(); ClearTempDirectory(); await JoinableTaskFactory.SwitchToMainThreadAsync(cancellationToken); await GetDte(); await GetStatusBar(); GetOptions(); GetCodeModelProvider(); _solutionMonitor = new SolutionMonitor(); _templateController = new TemplateController(Dte); _eventQueue = new EventQueue(_statusBar); _generationController = new GenerationController(Dte, _metadataProvider, _templateController, _eventQueue); RenderTemplate.Initialize(this); WireUpEvents(); ErrorList.Initialize(this); Instance = this; }
/// <summary> /// Initialization of the package; this method is called right after the package is sited, so this is the place /// where you can put all the initialization code that rely on services provided by VisualStudio. /// </summary> protected override void Initialize() { base.Initialize(); GetDte(); GetStatusbar(); GetCodeModelProvider(); RegisterLanguageService(); RegisterIcons(); ClearTempDirectory(); this.solutionMonitor = new SolutionMonitor(); this.templateController = new TemplateController(dte); this.eventQueue = new EventQueue(statusBar); this.generationController = new GenerationController(dte, metadataProvider, templateController, eventQueue); RenderTemplate.Initialize(this); WireupEvents(); ErrorList.Initialize(this); }