Ejemplo n.º 1
0
        public static async Task InitializeAsync(AsyncPackage package)
        {
            // Verify the current thread is the UI thread - the call to AddCommand in GitBlamerCommand's constructor requires
            // the UI thread.
            ThreadHelper.ThrowIfNotOnUIThread();

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

            Instance = new PreviousRevisionCommand(package, commandService);
        }
Ejemplo n.º 2
0
        protected override async Task InitializeAsync(CancellationToken cancellationToken, IProgress <ServiceProgressData> progress)
        {
            DTE = await GetServiceAsync(typeof(DTE)) as DTE;

            CommandHelper.Dte = DTE;
            _eventHelper      = new EventHelper(DTE);

            await JoinableTaskFactory.SwitchToMainThreadAsync(cancellationToken);

            await PreviousRevisionCommand.InitializeAsync(this);

            await LaterRevisionCommand.InitializeAsync(this);

            await InfoRevisionCommand.InitializeAsync(this);

            await ToolWindows.CommitDetailsToolWindowCommand.InitializeAsync(this);

            CommandHelper.ImageService = await GetServiceAsync(typeof(SVsImageService)) as IVsImageService2;
        }