示例#1
0
        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);
        }
示例#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);
        }
示例#3
0
 public static void Initialize(Package package)
 {
     Instance = new DiffFilesCommand(package);
 }
示例#4
0
        protected override async Task InitializeAsync(CancellationToken cancellationToken, IProgress <ServiceProgressData> progress)
        {
            await JoinableTaskFactory.SwitchToMainThreadAsync();

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