public static async Task InitializeAsync(AsyncPackage package)
        {
            var commandService = await package.GetServiceAsync(typeof(IMenuCommandService)) as OleMenuCommandService;

            var dte = await package.GetServiceAsync(typeof(DTE)) as DTE2;

            Instance = new DiffFilesCommand(commandService, dte);
        }
Beispiel #2
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 DiffFilesCommand's constructor requires
            // the UI thread.
            await ThreadHelper.JoinableTaskFactory.SwitchToMainThreadAsync(package.DisposalToken);

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

            Instance = new DiffFilesCommand(package, commandService);
        }
Beispiel #3
0
 public static void Initialize(Package package)
 {
     Instance = new DiffFilesCommand(package);
 }
Beispiel #4
0
        protected override async Task InitializeAsync(CancellationToken cancellationToken, IProgress <ServiceProgressData> progress)
        {
            await JoinableTaskFactory.SwitchToMainThreadAsync();

            await DiffFilesCommand.InitializeAsync(this);
        }
Beispiel #5
0
 protected override async Task InitializeAsync(CancellationToken cancellationToken, IProgress <ServiceProgressData> progress)
 {
     await DiffFilesCommand.Initialize(this);
 }
Beispiel #6
0
 protected override void Initialize()
 {
     DiffFilesCommand.Initialize(this);
     base.Initialize();
 }
Beispiel #7
0
 private static void SetInstance(DiffFilesCommand value)
 {
     instance = value;
 }