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

            var commandService = await package.GetServiceAsync <IMenuCommandService, OleMenuCommandService>();

            var dte = await package.GetServiceAsync <DTE, DTE2>();

            Instance = new BreakInCurrentDocument(package, commandService, dte);
        }
Example #2
0
        protected override async Task InitializeAsync(CancellationToken cancellationToken, IProgress <ServiceProgressData> progress)
        {
            await JoinableTaskFactory.SwitchToMainThreadAsync(cancellationToken);

            await BreakInCurrentDocument.InitializeAsync(this);
        }