Пример #1
0
        /// <summary>
        /// Initializes the singleton instance of the command.
        /// </summary>
        /// <param name="package">Owner package, not null.</param>
        public static async Task InitializeAsync(AsyncPackage package)
        {
            // Switch to the main thread - the call to AddCommand in ForceStepInto's constructor requires
            // the UI thread.
            await ThreadHelper.JoinableTaskFactory.SwitchToMainThreadAsync(package.DisposalToken);

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

            Instance = new ForceStepInto(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);
        }