public PageActionBarViewModel(IManagerPage managerPage, IProgressManager progressManager, INuGetPackageManager projectManager, IExtensibleProjectLocator projectLocator, IPackageCommandService packageCommandService, IPackageOperationContextService packageOperationContextService, IMessageService messageService) { Argument.IsNotNull(() => managerPage); Argument.IsNotNull(() => projectManager); Argument.IsNotNull(() => progressManager); Argument.IsNotNull(() => projectLocator); Argument.IsNotNull(() => packageCommandService); Argument.IsNotNull(() => packageOperationContextService); Argument.IsNotNull(() => messageService); _parentManagerPage = managerPage; _projectManager = projectManager; _projectLocator = projectLocator; _progressManager = progressManager; _packageCommandService = packageCommandService; _packageOperationContextService = packageOperationContextService; _messageService = messageService; BatchUpdate = new TaskCommand(BatchUpdateExecuteAsync, BatchUpdateCanExecute); BatchInstall = new TaskCommand(BatchInstallExecuteAsync, BatchInstallCanExecute); CheckAll = new TaskCommand(CheckAllExecuteAsync); CanBatchInstall = _parentManagerPage.CanBatchInstallOperations; CanBatchUpdate = _parentManagerPage.CanBatchUpdateOperations; }
protected PackageManagerContextWatcherBase(IPackageOperationNotificationService packageOperationNotificationService, IPackageOperationContextService packageOperationContextService) : base(packageOperationNotificationService) { Argument.IsNotNull(() => packageOperationContextService); _packageOperationContextService = packageOperationContextService; _packageOperationContextService.OperationContextDisposing += OnOperationContextDisposing; }
public BackupFileSystemService(IPackageOperationContextService operationContextService, IFileSystemService fileSystemService) { Argument.IsNotNull(() => operationContextService); Argument.IsNotNull(() => fileSystemService); _operationContextService = operationContextService; _fileSystemService = fileSystemService; }
public ExplorerPageViewModel(ExplorerPage page, IPackageLoaderService packagesLoaderService, IModelProvider <ExplorerSettingsContainer> settingsProvider, IPackageMetadataMediaDownloadService packageMetadataMediaDownloadService, INuGetFeedVerificationService nuGetFeedVerificationService, ICommandManager commandManager, IDispatcherService dispatcherService, IRepositoryContextService repositoryService, ITypeFactory typeFactory, IDefferedPackageLoaderService defferedPackageLoaderService, IPackageOperationContextService packageOperationContextService, INuGetCacheManager nuGetCacheManager, INuGetConfigurationService nuGetConfigurationService, IDispatcherProviderService dispatcherProviderService) { Argument.IsNotNull(() => packagesLoaderService); Argument.IsNotNull(() => settingsProvider); Argument.IsNotNull(() => packageMetadataMediaDownloadService); Argument.IsNotNull(() => commandManager); Argument.IsNotNull(() => nuGetFeedVerificationService); Argument.IsNotNull(() => dispatcherService); Argument.IsNotNull(() => repositoryService); Argument.IsNotNull(() => typeFactory); Argument.IsNotNull(() => defferedPackageLoaderService); Argument.IsNotNull(() => packageOperationContextService); Argument.IsNotNull(() => nuGetCacheManager); Argument.IsNotNull(() => nuGetConfigurationService); Argument.IsNotNull(() => dispatcherProviderService); _dispatcherService = dispatcherService; _packageMetadataMediaDownloadService = packageMetadataMediaDownloadService; _nuGetFeedVerificationService = nuGetFeedVerificationService; _repositoryService = repositoryService; _defferedPackageLoaderService = defferedPackageLoaderService; _packageOperationContextService = packageOperationContextService; _typeFactory = typeFactory; _packagesLoaderService = packagesLoaderService; _nuGetCacheManager = nuGetCacheManager; _nuGetConfigurationService = nuGetConfigurationService; _dispatcherProviderService = dispatcherProviderService; Settings = settingsProvider.Model; LoadNextPackagePage = new TaskCommand(LoadNextPackagePageExecuteAsync); CancelPageLoading = new TaskCommand(CancelPageLoadingExecuteAsync); RefreshCurrentPage = new TaskCommand(RefreshCurrentPageExecuteAsync); commandManager.RegisterCommand(nameof(RefreshCurrentPage), RefreshCurrentPage, this); Title = page.Parameters.Tab.Name; _initialSearchParams = page.Parameters.InitialSearchParameters; //if null, standard Settings will not be overriden if (Title != "Browse") { #pragma warning disable IDISP004 // Don't ignore created IDisposable. _packagesLoaderService = this.GetServiceLocator().ResolveType <IPackageLoaderService>(Title); #pragma warning restore IDISP004 // Don't ignore created IDisposable. } if (!Enum.TryParse(Title, out _pageType)) { Log.Error("Unrecognized page type"); } CanBatchProjectActions = _pageType != MetadataOrigin.Installed; Page = page; }
public PackageCommandService(IPleaseWaitService pleaseWaitService, IRepositoryService repositoryService, IPackageQueryService packageQueryService, IPackageOperationService packageOperationService, IPackageOperationContextService packageOperationContextService) { Argument.IsNotNull(() => pleaseWaitService); Argument.IsNotNull(() => packageQueryService); Argument.IsNotNull(() => packageOperationService); Argument.IsNotNull(() => packageOperationContextService); _pleaseWaitService = pleaseWaitService; _packageQueryService = packageQueryService; _packageOperationService = packageOperationService; _packageOperationContextService = packageOperationContextService; _localRepository = repositoryService.LocalRepository; }
public RollbackWatcher(IPackageOperationNotificationService packageOperationNotificationService, IPackageOperationContextService packageOperationContextService, IRollbackPackageOperationService rollbackPackageOperationService, IBackupFileSystemService backupFileSystemService, IFileSystemService fileSystemService) : base(packageOperationNotificationService) { Argument.IsNotNull(() => packageOperationContextService); Argument.IsNotNull(() => rollbackPackageOperationService); Argument.IsNotNull(() => backupFileSystemService); Argument.IsNotNull(() => fileSystemService); _packageOperationContextService = packageOperationContextService; _rollbackPackageOperationService = rollbackPackageOperationService; _backupFileSystemService = backupFileSystemService; _fileSystemService = fileSystemService; packageOperationContextService.OperationContextDisposing += OnOperationContextDisposing; }
public PackageBatchViewModel(PackagesBatch packagesBatch, IPackageCommandService packageCommandService, IPackageOperationContextService packageOperationContextService) { Argument.IsNotNull(() => packagesBatch); Argument.IsNotNull(() => packageCommandService); Argument.IsNotNull(() => packageOperationContextService); _packageCommandService = packageCommandService; _packageOperationContextService = packageOperationContextService; PackagesBatch = packagesBatch; AccentColorHelper.CreateAccentColorResourceDictionary(); ActionName = _packageCommandService.GetActionName(packagesBatch.OperationType); PluralActionName = _packageCommandService.GetPluralActionName(packagesBatch.OperationType); PackageAction = new Command(OnPackageActionExecute, OnPackageActionCanExecute); ApplyAll = new Command(OnApplyAllExecute, OnApplyAllCanExecute); }
public PackageOperationService(IPackageOperationContextService packageOperationContextService, ILogger logger, IPackageManager packageManager, IRepositoryService repositoryService, IRepositoryCacheService repositoryCacheService) { Argument.IsNotNull(() => packageOperationContextService); Argument.IsNotNull(() => logger); Argument.IsNotNull(() => packageManager); Argument.IsNotNull(() => repositoryService); Argument.IsNotNull(() => repositoryCacheService); _packageOperationContextService = packageOperationContextService; _logger = logger; _packageManager = packageManager; _repositoryCacheService = repositoryCacheService; _localRepository = repositoryCacheService.GetNuGetRepository(repositoryService.LocalRepository); DependencyVersion = DependencyVersion.Lowest; }
public PackageOperationService(IPackageOperationContextService packageOperationContextService, ILogger logger, INuGetPackageManager nuGetPackageManager, IRepositoryService repositoryService, IApiPackageRegistry apiPackageRegistry, IDefaultExtensibleProjectProvider defaultExtensibleProjectProvider, ISourceRepositoryProvider sourceRepositoryProvider, IPackageOperationNotificationService packageOperationNotificationService) { Argument.IsNotNull(() => packageOperationContextService); Argument.IsNotNull(() => logger); Argument.IsNotNull(() => nuGetPackageManager); Argument.IsNotNull(() => repositoryService); Argument.IsNotNull(() => apiPackageRegistry); Argument.IsNotNull(() => sourceRepositoryProvider); Argument.IsNotNull(() => defaultExtensibleProjectProvider); Argument.IsNotNull(() => packageOperationNotificationService); _packageOperationContextService = packageOperationContextService; _logger = logger; _nuGetPackageManager = nuGetPackageManager; _apiPackageRegistry = apiPackageRegistry; _packageOperationNotificationService = packageOperationNotificationService; _defaultProject = defaultExtensibleProjectProvider.GetDefaultProject(); // Note: this setting should be global, probably set by Resolver (which replaced the old one InstallWalker); DependencyVersion = DependencyBehavior.Lowest; }
public RollbackWatcher(IPackageOperationNotificationService packageOperationNotificationService, IPackageOperationContextService packageOperationContextService, IRollbackPackageOperationService rollbackPackageOperationService, IBackupFileSystemService backupFileSystemService, IFileSystemService fileSystemService, IDirectoryService directoryService) : base(packageOperationNotificationService, packageOperationContextService) { Argument.IsNotNull(() => rollbackPackageOperationService); Argument.IsNotNull(() => backupFileSystemService); Argument.IsNotNull(() => fileSystemService); Argument.IsNotNull(() => directoryService); _rollbackPackageOperationService = rollbackPackageOperationService; _backupFileSystemService = backupFileSystemService; _fileSystemService = fileSystemService; _directoryService = directoryService; }