public static async Task InitializeAsync(AsyncPackage package) { await ThreadHelper.JoinableTaskFactory.SwitchToMainThreadAsync(package.DisposalToken); OleMenuCommandService commandService = await package.GetServiceAsync(typeof(IMenuCommandService)) as OleMenuCommandService; Instance = new ForceStepOut(package, commandService); }
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); await ForceStepCommand.InitializeAsync(this); await ForceContinue.InitializeAsync(this); await ForceStepOut.InitializeAsync(this); await ForceStepInto.InitializeAsync(this); await ManuallyDisable.InitializeAsync(this); await ManuallyEnable.InitializeAsync(this); BreakpointEvents.InitalizeBreakpointEvents(this); }