Ejemplo n.º 1
0
 public CleanSolutionCommandBase(IProjectFolderSerivce projectFolderService,
                                 IErrorHandlerService errorHandlerService,
                                 IVsOutputPaneService vsOutputPaneService,
                                 OleMenuCommandService commandService,
                                 bool deletePackages,
                                 Guid packageCmdSet,
                                 int commandId) :
     base(projectFolderService, errorHandlerService, vsOutputPaneService, commandService, packageCmdSet, commandId)
 {
     this.deletePackages = deletePackages;
 }
Ejemplo n.º 2
0
        protected override async Task InitializeAsync(CancellationToken cancellationToken, IProgress <ServiceProgressData> progress)
        {
            await this.JoinableTaskFactory.SwitchToMainThreadAsync(cancellationToken);

            projectFolderService = new ProjectFolderSerivce((DTE2)GetGlobalService(typeof(SDTE)));
            errorHandlerService  = new ErrorHandlerService((IVsOutputWindowPane)await GetServiceAsync(typeof(SVsGeneralOutputWindowPane)));
            OleMenuCommandService commandService = await this.GetServiceAsync((typeof(IMenuCommandService))) as OleMenuCommandService;

            new CleanSolutionCommand(projectFolderService, errorHandlerService, commandService);
            new CleanProjectCommand(projectFolderService, errorHandlerService, commandService);
        }
Ejemplo n.º 3
0
        protected CleanCommandBase(IProjectFolderSerivce projectFolderService,
                                   IErrorHandlerService errorHandlerService,
                                   OleMenuCommandService commandService, Guid guidPackageCmdSet, int commandId)
        {
            if (commandService == null)
            {
                throw new ArgumentNullException(nameof(commandService));
            }
            this.projectFolderService = projectFolderService ?? throw new ArgumentNullException(nameof(projectFolderService));
            this.errorHandlerService  = errorHandlerService ?? throw new ArgumentNullException(nameof(errorHandlerService));
            var menuCommandID = new CommandID(guidPackageCmdSet, commandId);
            var menuItem      = new MenuCommand(this.Execute, menuCommandID);

            commandService.AddCommand(menuItem);
        }
 public CleanSolutionWithoutPackagesCommand(IProjectFolderSerivce projectFolderService, IErrorHandlerService errorHandlerService, IVsOutputPaneService vsOutputPaneService, OleMenuCommandService commandService) :
     base(projectFolderService, errorHandlerService, vsOutputPaneService, commandService, deletePackages: false, PackageGuids.guidCleanSolutionWithoutPackagesCommandPackageCmdSet, PackageIds.CleanSolutionWithoutPackagesCommandId)
 {
 }
Ejemplo n.º 5
0
 public CleanProjectCommand(IProjectFolderSerivce projectFolderService, IErrorHandlerService errorHandlerService, IVsOutputPaneService vsOutputPaneService, OleMenuCommandService commandService) :
     base(projectFolderService, errorHandlerService, vsOutputPaneService, commandService, PackageGuids.guidCleanProjectCommandPackageCmdSet, PackageIds.CleanProjectCommandId)
 {
 }
 public CleanSolutionCommand(IProjectFolderSerivce projectFolderService, IErrorHandlerService errorHandlerService, OleMenuCommandService commandService) :
     base(projectFolderService, errorHandlerService, commandService, PackageGuids.guidCleanSolutionCommandPackageCmdSet, PackageIds.CleanSolutionCommandId)
 {
 }