コード例 #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 BuildNotifyCommand(package, commandService);
        }
コード例 #2
0
        protected override async Task InitializeAsync(CancellationToken cancellationToken, IProgress <ServiceProgressData> progress)
        {
            var dte = GetGlobalService(typeof(DTE)) as DTE2;

            await JoinableTaskFactory.SwitchToMainThreadAsync(cancellationToken);

            BuildEvents = dte.Events.BuildEvents;

            BuildEvents.OnBuildDone           += OnSolutionBuildDone;
            BuildEvents.OnBuildProjConfigDone += OnProjectBuildDone;

            _logger           = new Logger(this);
            _exceptionHandler = new ExceptionHandler(this, _logger);

            await BuildNotifyCommand.InitializeAsync(this);
        }