protected override async Tasks.Task InitializeAsync(CancellationToken cancellationToken, IProgress <ServiceProgressData> progress)
        {
            if (await GetServiceAsync(typeof(IMenuCommandService)).ConfigureAwait(false) is OleMenuCommandService commandService)
            {
#if UI_ENABLED
                InstallLibraryCommand.Initialize(this, commandService);
#endif
                CleanCommand.Initialize(this, commandService);
                RestoreCommand.Initialize(this, commandService);
                RestoreSolutionCommand.Initialize(this, commandService);
                RestoreOnBuildCommand.Initialize(this, commandService);
                ManageLibrariesCommand.Initialize(this, commandService);
            }
        }
Esempio n. 2
0
        protected override async Tasks.Task InitializeAsync(CancellationToken cancellationToken, IProgress <ServiceProgressData> progress)
        {
            await ThreadHelper.JoinableTaskFactory.SwitchToMainThreadAsync();

            IComponentModel componentModel = GetService(typeof(SComponentModel)) as IComponentModel;

            componentModel.DefaultCompositionService.SatisfyImportsOnce(this);

            OleMenuCommandService commandService = GetService(typeof(IMenuCommandService)) as OleMenuCommandService;

            if (commandService != null && LibraryCommandService != null)
            {
                InstallLibraryCommand.Initialize(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);
            }
        }
Esempio n. 3
0
 public static void Initialize(Package package, OleMenuCommandService commandService, ILibraryCommandService libraryCommandService)
 {
     Instance = new RestoreSolutionCommand(package, commandService, libraryCommandService);
 }