protected override async Task InitializeAsync(CancellationToken cancellationToken, IProgress <ServiceProgressData> progress) { await JoinableTaskFactory.SwitchToMainThreadAsync(); var commandService = await GetServiceAsync(typeof(IMenuCommandService)) as OleMenuCommandService; Options = (Options)GetDialogPage(typeof(Options)); EnableReloadCommand.Initialize(this, commandService); }
protected override async Task InitializeAsync(CancellationToken cancellationToken, IProgress <ServiceProgressData> progress) { Options = (Options)GetDialogPage(typeof(Options)); var commandService = await GetServiceAsync(typeof(IMenuCommandService)) as OleMenuCommandService; if (commandService != null) { EnableReloadCommand.Initialize(this, commandService); } }
protected override void Initialize() { Options = (Options)GetDialogPage(typeof(Options)); Logger.Initialize(this, Vsix.Name); Telemetry.Initialize(this, Vsix.Version, "a97d5a5b-1ce8-4a18-8ee6-1755367949cb"); EnableReloadCommand.Initialize(this); base.Initialize(); }
public static void Initialize(Package package) { Instance = new EnableReloadCommand(package); }
public static void Initialize(Package package, OleMenuCommandService commandService) { Instance = new EnableReloadCommand(package, commandService); }