protected override async Tasks.Task InitializeAsync(CancellationToken cancellationToken, IProgress <ServiceProgressData> progress) { await ThreadHelper.JoinableTaskFactory.SwitchToMainThreadAsync(); var componentModel = GetService(typeof(SComponentModel)) as IComponentModel; Assumes.Present(componentModel); componentModel.DefaultCompositionService.SatisfyImportsOnce(this); var commandService = GetService(typeof(IMenuCommandService)) as OleMenuCommandService; if (commandService != null && LibraryCommandService != null) { InstallLibraryCommand.Initialize(this, commandService, LibraryCommandService, DependenciesFactory); CleanCommand.Initialize(this, commandService, LibraryCommandService); RestoreCommand.Initialize(this, commandService, LibraryCommandService); RestoreSolutionCommand.Initialize(this, commandService, LibraryCommandService); RestoreOnBuildCommand.Initialize(this, commandService, DependenciesFactory); ManageLibrariesCommand.Initialize(this, commandService, LibraryCommandService, DependenciesFactory); } }
public static void Initialize(Package package, OleMenuCommandService commandService) { Instance = new CleanCommand(package, commandService); }
public static void Initialize(AsyncPackage package, OleMenuCommandService commandService, ILibraryCommandService libraryCommandService) { Instance = new CleanCommand(package, commandService, libraryCommandService); }