/// <summary>
        /// Initializes the singleton instance of the command.
        /// </summary>
        /// <param name="package">Owner package, not null.</param>
        public static async Task InitializeAsync(AsyncPackage package, CancellationToken cancellationToken)
        {
            var dteObject = await package.GetServiceAsync(typeof(DTE));

            var menuCommandServiceObject = await package.GetServiceAsync(typeof(IMenuCommandService));

            cancellationToken.ThrowIfCancellationRequested();
            Debug.Assert(dteObject != null, $"Assertion failed: {nameof(dteObject)} != null");
            Debug.Assert(menuCommandServiceObject != null, $"Assertion failed: {nameof(menuCommandServiceObject)} != null");

            await package.JoinableTaskFactory.SwitchToMainThreadAsync(cancellationToken);

            Instance = new GitExtCommands(package, (_DTE)dteObject, (IMenuCommandService)menuCommandServiceObject);
        }
        protected override async Task InitializeAsync(CancellationToken cancellationToken, IProgress <ServiceProgressData> progress)
        {
            await base.InitializeAsync(cancellationToken, progress);

            await GitExtCommands.InitializeAsync(this, cancellationToken);
        }
Beispiel #3
0
 /// <summary>
 /// Initializes the singleton instance of the command.
 /// </summary>
 /// <param name="package">Owner package, not null.</param>
 public static void Initialize(Package package)
 {
     Instance = new GitExtCommands(package);
 }
Beispiel #4
0
 /// <summary>
 /// Initializes the singleton instance of the command.
 /// </summary>
 /// <param name="package">Owner package, not null.</param>
 public static void Initialize(Package package)
 {
     Instance = new GitExtCommands(package);
 }
Beispiel #5
0
 protected override void Initialize()
 {
     GitExtCommands.Initialize(this);
     base.Initialize();
 }