public ExplorerTopBarViewModel(ExplorerSettingsContainer settings, ITypeFactory typeFactory, IUIVisualizerService uIVisualizerService, INuGetConfigurationService configurationService, INuGetCacheManager nuGetCacheManager, IPleaseWaitService pleaseWaitService, IMessageService messageService, IMessageMediator messageMediator) { Argument.IsNotNull(() => typeFactory); Argument.IsNotNull(() => uIVisualizerService); Argument.IsNotNull(() => configurationService); Argument.IsNotNull(() => settings); Argument.IsNotNull(() => nuGetCacheManager); Argument.IsNotNull(() => pleaseWaitService); Argument.IsNotNull(() => messageService); Argument.IsNotNull(() => messageMediator); _typeFactory = typeFactory; _uIVisualizerService = uIVisualizerService; _configurationService = configurationService; _nuGetCacheManager = nuGetCacheManager; _pleaseWaitService = pleaseWaitService; _messageService = messageService; _messageMediator = messageMediator; Settings = settings; Title = "Manage NuGet Packages"; CommandInitialize(); }
public MainViewModel(IPackagesUIService packagesUiService, IEchoService echoService, INuGetConfigurationService nuGetConfigurationService, INuGetFeedVerificationService feedVerificationService, IMessageService messageService, IPackagesUpdatesSearcherService packagesUpdatesSearcherService, IPackageBatchService packageBatchService, IUIVisualizerService uiVisualizerService) { Argument.IsNotNull(() => packagesUiService); Argument.IsNotNull(() => echoService); Argument.IsNotNull(() => nuGetConfigurationService); Argument.IsNotNull(() => feedVerificationService); Argument.IsNotNull(() => messageService); Argument.IsNotNull(() => packageBatchService); Argument.IsNotNull(() => uiVisualizerService); _packagesUiService = packagesUiService; _nuGetConfigurationService = nuGetConfigurationService; _feedVerificationService = feedVerificationService; _messageService = messageService; _packagesUpdatesSearcherService = packagesUpdatesSearcherService; _packageBatchService = packageBatchService; _uiVisualizerService = uiVisualizerService; Echo = echoService.GetPackageManagementEcho(); AvailableUpdates = new ObservableCollection<IPackageDetails>(); ShowExplorer = new Command(OnShowExplorerExecute); AdddPackageSource = new TaskCommand(OnAdddPackageSourceExecute, OnAdddPackageSourceCanExecute); VerifyFeed = new TaskCommand(OnVerifyFeedExecute, OnVerifyFeedCanExecute); CheckForUpdates = new TaskCommand(OnCheckForUpdatesExecute); OpenUpdateWindow = new TaskCommand(OnOpenUpdateWindowExecute, OnOpenUpdateWindowCanExecute); Settings = new TaskCommand(OnSettingsExecute); }
public MainViewModel(IPackagesUIService packagesUiService, IEchoService echoService, INuGetConfigurationService nuGetConfigurationService, INuGetFeedVerificationService feedVerificationService, IMessageService messageService, IPackagesUpdatesSearcherService packagesUpdatesSearcherService, IPackageBatchService packageBatchService, IUIVisualizerService uiVisualizerService) { Argument.IsNotNull(() => packagesUiService); Argument.IsNotNull(() => echoService); Argument.IsNotNull(() => nuGetConfigurationService); Argument.IsNotNull(() => feedVerificationService); Argument.IsNotNull(() => messageService); Argument.IsNotNull(() => packageBatchService); Argument.IsNotNull(() => uiVisualizerService); _packagesUiService = packagesUiService; _nuGetConfigurationService = nuGetConfigurationService; _feedVerificationService = feedVerificationService; _messageService = messageService; _packagesUpdatesSearcherService = packagesUpdatesSearcherService; _packageBatchService = packageBatchService; _uiVisualizerService = uiVisualizerService; Echo = echoService.GetPackageManagementEcho(); AvailableUpdates = new ObservableCollection <IPackageDetails>(); ShowExplorer = new Command(OnShowExplorerExecute); AdddPackageSource = new TaskCommand(OnAdddPackageSourceExecute, OnAdddPackageSourceCanExecute); VerifyFeed = new TaskCommand(OnVerifyFeedExecute, OnVerifyFeedCanExecute); CheckForUpdates = new TaskCommand(OnCheckForUpdatesExecute); OpenUpdateWindow = new TaskCommand(OnOpenUpdateWindowExecute, OnOpenUpdateWindowCanExecute); Settings = new TaskCommand(OnSettingsExecute); }
public NuGetExplorerInitializationService(ILanguageService languageService, ICredentialProviderLoaderService credentialProviderLoaderService, INuGetProjectUpgradeService nuGetProjectUpgradeService, INuGetConfigurationService nuGetConfigurationService, IViewModelLocator vmLocator, ITypeFactory typeFactory) { Argument.IsNotNull(() => languageService); Argument.IsNotNull(() => credentialProviderLoaderService); Argument.IsNotNull(() => nuGetProjectUpgradeService); Argument.IsNotNull(() => nuGetConfigurationService); var serviceLocator = ServiceLocator.Default; //instantiate watchers serviceLocator.RegisterTypeAndInstantiate <DeletemeWatcher>(); serviceLocator.RegisterTypeAndInstantiate <RollbackWatcher>(); //instantiate package manager listener serviceLocator.RegisterTypeAndInstantiate <NuGetToCatelLogTranslator>(); //set language resources languageService.RegisterLanguageSource(new LanguageResourceSource("Orc.NuGetExplorer", "Orc.NuGetExplorer.Properties", "Resources")); languageService.RegisterLanguageSource(new LanguageResourceSource("Orc.NuGetExplorer.Xaml", "Orc.NuGetExplorer.Properties", "Resources")); //run upgrade //pre-initialization to prepare old data to new NuGetExplorer var basicV3Scenario = typeFactory.CreateInstanceWithParametersAndAutoCompletion <V3RestorePackageConfigAndReinstall>(); nuGetProjectUpgradeService.AddUpgradeScenario(basicV3Scenario); _nuGetProjectUpgradeService = nuGetProjectUpgradeService; _nuGetConfigurationService = nuGetConfigurationService; }
public ExtensibleProjectLocator(ITypeFactory typeFactory, INuGetConfigurationService configurationService) { Argument.IsNotNull(() => typeFactory); Argument.IsNotNull(() => configurationService); _typeFactory = typeFactory; _managerConfigurationService = configurationService; }
public SettingsViewModel(INuGetConfigurationService nuGetConfigurationService) { Argument.IsNotNull(() => nuGetConfigurationService); _nuGetConfigurationService = nuGetConfigurationService; Title = "Package source settings"; }
public NuGetSettingsViewModel(string title, IModelProvider <ExplorerSettingsContainer> settingsProvider, INuGetConfigurationService configurationService, IDefaultPackageSourcesProvider defaultPackageSourcesProvider) : this(settingsProvider?.Model, configurationService, defaultPackageSourcesProvider) { Argument.IsNotNull(() => settingsProvider); Title = title ?? DefaultTitle; }
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 ExplorerSettingsContainerModelProvider(ITypeFactory typeFactory, INuGetConfigurationService nugetConfigurationService, IConfigurationService configurationService) : base(typeFactory) { Argument.IsNotNull(() => typeFactory); Argument.IsNotNull(() => nugetConfigurationService); Argument.IsNotNull(() => configurationService); _nugetConfigurationService = nugetConfigurationService; _configurationService = configurationService; _explorerSettings = new Lazy <ExplorerSettingsContainer>(() => Create()); }
public DefaultExtensibleProjectProvider(INuGetConfigurationService configurationService, IExtensibleProjectLocator extensibleProjectLocator, ITypeFactory typeFactory) { Argument.IsNotNull(() => configurationService); Argument.IsNotNull(() => extensibleProjectLocator); Argument.IsNotNull(() => typeFactory); _configurationService = configurationService; _extensibleProjectLocator = extensibleProjectLocator; _typeFactory = typeFactory; CreateAndRegisterDefaultProject(); }
public PackageManager(IRepositoryService repositoryService, INuGetConfigurationService nuGetConfigurationService, ILogger logger, IPackageCacheService packageCacheService, IRepositoryCacheService repositoryCacheService) : this(repositoryService.GetSourceAggregateRepository(), repositoryCacheService, nuGetConfigurationService.GetDestinationFolder()) { Argument.IsNotNull(() => repositoryService); Argument.IsNotNull(() => nuGetConfigurationService); Argument.IsNotNull(() => logger); Argument.IsNotNull(() => packageCacheService); _packageCacheService = packageCacheService; Logger = logger; }
public RepositoryService(INuGetConfigurationService nuGetConfigurationService, IPackageRepositoryFactory packageRepositoryFactory, IRepositoryCacheService repositoryCacheService, ITypeFactory typeFactory) { Argument.IsNotNull(() => nuGetConfigurationService); Argument.IsNotNull(() => nuGetConfigurationService); Argument.IsNotNull(() => repositoryCacheService); Argument.IsNotNull(() => typeFactory); _nuGetConfigurationService = nuGetConfigurationService; _repositoryFactory = packageRepositoryFactory; _repositoryCacheService = repositoryCacheService; _typeFactory = typeFactory; LocalRepository = GetLocalRepository(); LocalNuGetRepository = _repositoryCacheService.GetNuGetRepository(LocalRepository); }
public ExampleNuGetExplorerInitializationService( ILanguageService languageService, ICredentialProviderLoaderService credentialProviderLoaderService, INuGetProjectUpgradeService nuGetProjectUpgradeService, INuGetConfigurationService nuGetConfigurationService, IViewModelLocator vmLocator, ITypeFactory typeFactory, IExtensibleProjectLocator projectLocator, IAccentColorService accentColorService) : base(languageService, credentialProviderLoaderService, nuGetProjectUpgradeService, nuGetConfigurationService, vmLocator, typeFactory) { Argument.IsNotNull(() => projectLocator); Argument.IsNotNull(() => accentColorService); var serviceLocator = ServiceLocator.Default; // Example: override default project serviceLocator.RegisterType <IDefaultExtensibleProjectProvider, NuGetProjectProvider>(); serviceLocator.RegisterType <INuGetConfigurationResetService, ExampleNuGetConfigurationResetService>(); // initialize theme accentColorService.SetAccentColor(Colors.Orange); // add loggers serviceLocator.RegisterTypeAndInstantiate <SimpleLogListener>(); var catelListener = serviceLocator.RegisterTypeAndInstantiate <CatelLogListener>(); LogManager.AddListener(catelListener); // add upgrade listener serviceLocator.RegisterTypeAndInstantiate <ExampleUpgradeListener>(); // IApiPackageRegistry testing var apiRegistry = serviceLocator.ResolveType <IApiPackageRegistry>(); //apiRegistry.Register("PackageName.Api", "1.0.0-version"); // Example: changing storage for Credentials //credentialProviderLoaderService.SetCredentialPolicy(Enums.CredentialStoragePolicy.WindowsVaultConfigurationFallback); // Override size of packages queries nuGetConfigurationService.SetPackageQuerySize(40); }
public RepositoryService(IRepositoryContextService repositoryContextService, IExtensibleProjectLocator extensibleProjectLocator, INuGetPackageManager projectManager, INuGetConfigurationService nuGetConfigurationService, IDefaultExtensibleProjectProvider defaultExtensibleProjectProvider, ISourceRepositoryProvider repositoryProvider) { Argument.IsNotNull(() => repositoryContextService); Argument.IsNotNull(() => extensibleProjectLocator); Argument.IsNotNull(() => projectManager); Argument.IsNotNull(() => nuGetConfigurationService); Argument.IsNotNull(() => defaultExtensibleProjectProvider); Argument.IsNotNull(() => repositoryProvider); _repositoryContextService = repositoryContextService; _extensibleProjectLocator = extensibleProjectLocator; _projectManager = projectManager; _nuGetConfigurationService = nuGetConfigurationService; _defaultExtensibleProjectProvider = defaultExtensibleProjectProvider; _repositoryProvider = repositoryProvider; LocalRepository = GetMainProjectRepository(); }
public NuGetSettingsViewModel(ExplorerSettingsContainer settings, INuGetConfigurationService configurationService, IDefaultPackageSourcesProvider defaultPackageSourcesProvider) { Argument.IsNotNull(() => defaultPackageSourcesProvider); Argument.IsNotNull(() => configurationService); Argument.IsNotNull(() => settings); _defaultPackageSourcesProvider = defaultPackageSourcesProvider; _nuGetConfigurationService = configurationService; Title = DefaultTitle; Settings = settings; #pragma warning disable IDISP001 // Dispose created. var serviceLocator = this.GetServiceLocator(); #pragma warning restore IDISP001 // Dispose created. if (serviceLocator.IsTypeRegistered <INuGetConfigurationResetService>()) { CanReset = true; } }
public PackageSourceSettingViewModel(INuGetConfigurationService configurationService, INuGetFeedVerificationService feedVerificationService) { Argument.IsNotNull(() => configurationService); Argument.IsNotNull(() => feedVerificationService); _configurationService = configurationService; _feedVerificationService = feedVerificationService; RemovedFeeds = new List <NuGetFeed>(); DeferValidationUntilFirstSaveCall = true; DefaultFeed = Constants.DefaultNuGetOrgUri; DefaultSourceName = Constants.DefaultNuGetOrgName; SettingsFeeds = new List <NuGetFeed>(); Feeds = new ObservableCollection <NuGetFeed>(); Title = "Settings"; InitializeCommands(); }
public ExplorerViewModel(IRepositoryNavigatorService repositoryNavigatorService, ISearchSettingsService searchSettingsService, IPackageCommandService packageCommandService, IPleaseWaitService pleaseWaitService, IPackageQueryService packageQueryService, ISearchResultService searchResultService, IDispatcherService dispatcherService, IPackagesUpdatesSearcherService packagesUpdatesSearcherService, IPackageBatchService packageBatchService, INuGetConfigurationService nuGetConfigurationService, IConfigurationService configurationService) { Argument.IsNotNull(() => repositoryNavigatorService); Argument.IsNotNull(() => searchSettingsService); Argument.IsNotNull(() => packageCommandService); Argument.IsNotNull(() => pleaseWaitService); Argument.IsNotNull(() => packageQueryService); Argument.IsNotNull(() => searchResultService); Argument.IsNotNull(() => dispatcherService); Argument.IsNotNull(() => packagesUpdatesSearcherService); Argument.IsNotNull(() => packageBatchService); Argument.IsNotNull(() => nuGetConfigurationService); Argument.IsNotNull(() => configurationService); _repositoryNavigatorService = repositoryNavigatorService; _packageCommandService = packageCommandService; _pleaseWaitService = pleaseWaitService; _packageQueryService = packageQueryService; _dispatcherService = dispatcherService; _packagesUpdatesSearcherService = packagesUpdatesSearcherService; _packageBatchService = packageBatchService; _nuGetConfigurationService = nuGetConfigurationService; _configurationService = configurationService; SearchSettings = searchSettingsService.SearchSettings; SearchResult = searchResultService.SearchResult; AvailableUpdates = new ObservableCollection <IPackageDetails>(); PackageAction = new TaskCommand <IPackageDetails>(OnPackageActionExecuteAsync, OnPackageActionCanExecute); CheckForUpdates = new TaskCommand(OnCheckForUpdatesExecute); OpenUpdateWindow = new TaskCommand(OnOpenUpdateWindowExecuteAsync); AccentColorHelper.CreateAccentColorResourceDictionary(); }
public ExplorerViewModel(IRepositoryNavigatorService repositoryNavigatorService, ISearchSettingsService searchSettingsService, IPackageCommandService packageCommandService, IPleaseWaitService pleaseWaitService, IPackageQueryService packageQueryService, ISearchResultService searchResultService, IDispatcherService dispatcherService, IPackagesUpdatesSearcherService packagesUpdatesSearcherService, IPackageBatchService packageBatchService, INuGetConfigurationService nuGetConfigurationService, IConfigurationService configurationService) { Argument.IsNotNull(() => repositoryNavigatorService); Argument.IsNotNull(() => searchSettingsService); Argument.IsNotNull(() => packageCommandService); Argument.IsNotNull(() => pleaseWaitService); Argument.IsNotNull(() => packageQueryService); Argument.IsNotNull(() => searchResultService); Argument.IsNotNull(() => dispatcherService); Argument.IsNotNull(() => packagesUpdatesSearcherService); Argument.IsNotNull(() => packageBatchService); Argument.IsNotNull(() => nuGetConfigurationService); Argument.IsNotNull(() => configurationService); _repositoryNavigatorService = repositoryNavigatorService; _packageCommandService = packageCommandService; _pleaseWaitService = pleaseWaitService; _packageQueryService = packageQueryService; _dispatcherService = dispatcherService; _packagesUpdatesSearcherService = packagesUpdatesSearcherService; _packageBatchService = packageBatchService; _nuGetConfigurationService = nuGetConfigurationService; _configurationService = configurationService; SearchSettings = searchSettingsService.SearchSettings; SearchResult = searchResultService.SearchResult; AvailableUpdates = new ObservableCollection<IPackageDetails>(); PackageAction = new TaskCommand<IPackageDetails>(OnPackageActionExecuteAsync, OnPackageActionCanExecute); CheckForUpdates = new TaskCommand(OnCheckForUpdatesExecute); OpenUpdateWindow = new TaskCommand(OnOpenUpdateWindowExecuteAsync); AccentColorHelper.CreateAccentColorResourceDictionary(); }
public DefaultSourceRepositoryProvider(IModelProvider <ExplorerSettingsContainer> settingsProvider, INuGetConfigurationService nuGetConfigurationService) { Argument.IsNotNull(() => settingsProvider); _settings = settingsProvider.Model; _nuGetConfigurationService = nuGetConfigurationService; }
public NuGetSettingsViewModel(IModelProvider <ExplorerSettingsContainer> settingsProvider, INuGetConfigurationService configurationService, IDefaultPackageSourcesProvider defaultPackageSourcesProvider) : this(DefaultTitle, settingsProvider, configurationService, defaultPackageSourcesProvider) { }
public PackageSourceSettingViewModel(INuGetConfigurationService configurationService, INuGetFeedVerificationService feedVerificationService, INuGetConfigurationResetService nuGetConfigurationResetService) : this(configurationService, feedVerificationService) { Argument.IsNotNull(() => nuGetConfigurationResetService); _nuGetConfigurationResetService = nuGetConfigurationResetService; }