Exemple #1
0
        protected override void Initialize()
        {
            Logger.Initialize(this, Vsix.Name);
            Telemetry.Initialize(this, Vsix.Version, "1c740e68-eead-45bb-a583-0f1cf4c33100");

            ClearAllErrorsCommand.Initialize(this);
            EnableCommand.Initialize(this);
            OpenSettingsCommand.Initialize(this);
            RunNowCommand.Initialize(this);
            SpecifyRulesCommand.Initialize(this);

            base.Initialize();
        }
Exemple #2
0
        protected override async Task InitializeAsync(CancellationToken cancellationToken, IProgress <ServiceProgressData> progress)
        {
            Logger.Initialize(Vsix.Name);

            Options = (Options)GetDialogPage(typeof(Options));

            var commandService = await GetServiceAsync(typeof(IMenuCommandService)) as OleMenuCommandService;

            if (commandService != null)
            {
                ClearAllErrorsCommand.Initialize(this, commandService);
                ToggleAutoRunCommand.Initialize(this, commandService);
                OpenSettingsCommand.Initialize(this, commandService);
                RunNowCommand.Initialize(this, commandService);
                SpecifyRulesCommand.Initialize(this, commandService);
            }
        }
        protected override async Task InitializeAsync(CancellationToken cancellationToken, IProgress <ServiceProgressData> progress)
        {
            await JoinableTaskFactory.SwitchToMainThreadAsync();

            Logger.Initialize(Vsix.Name);

            Options = (Options)GetDialogPage(typeof(Options));


            if (await GetServiceAsync(typeof(IMenuCommandService)) is OleMenuCommandService commandService)
            {
                ClearAllErrorsCommand.Initialize(this, commandService);
                ToggleAutoRunCommand.Initialize(this, commandService);
                OpenSettingsCommand.Initialize(this, commandService);
                RunNowCommand.Initialize(this, commandService);
                SpecifyRulesCommand.Initialize(this, commandService);
            }
        }
 public static void Initialize(Package package)
 {
     Instance = new RunNowCommand(package);
 }
 public static void Initialize(Package package, OleMenuCommandService commandService)
 {
     Instance = new RunNowCommand(package, commandService);
 }