示例#1
0
        public static async Task InitializeAsync(AsyncPackage package)
        {
            await ThreadHelper.JoinableTaskFactory.SwitchToMainThreadAsync(package.DisposalToken);

            OleMenuCommandService commandService = await package.GetServiceAsync(typeof(IMenuCommandService)) as OleMenuCommandService;

            Instance = new ManuallyEnable(package, commandService);
        }
示例#2
0
        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);
        }