/// <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() { CreateCrud.Initialize(this); base.Initialize(); Dte = GetService(typeof(DTE)) as DTE2; Instance = this; Logger.Initialize(this, "Dapper CRUD Generator"); }
protected override async Task InitializeAsync(CancellationToken cancellationToken, IProgress <ServiceProgressData> progress) { // When initialized asynchronously, the current thread may be a background thread at this point. // Do any initialization that requires the UI thread after switching to the UI thread. await this.JoinableTaskFactory.SwitchToMainThreadAsync(cancellationToken); CreateCrud.Initialize(this); await base.InitializeAsync(cancellationToken, progress); Dte = await GetServiceAsync(typeof(DTE)) as DTE2; Instance = this; Logger.Initialize(this, "Dapper CRUD Generator"); }