internal InstallPackageCommand( ISolutionManager solutionManager, IVsPackageManagerFactory packageManagerFactory, IPackageRepositoryFactory repositoryFactory, IVsPackageSourceProvider packageSourceProvider, IHttpClientEvents httpClientEvents, IProductUpdateService productUpdateService, IVsCommonOperations vsCommonOperations, IDeleteOnRestartManager deleteOnRestartManager, bool networkAvailable) : base(solutionManager, packageManagerFactory, httpClientEvents, vsCommonOperations, deleteOnRestartManager) { _productUpdateService = productUpdateService; _repositoryFactory = repositoryFactory; _packageSourceProvider = packageSourceProvider; if (networkAvailable) { _isNetworkAvailable = isNetworkAvailable(); } else { _isNetworkAvailable = false; } }
private void AddUpdateBar(IProductUpdateService productUpdateService) { _updateBar = new ProductUpdateBar(productUpdateService); _updateBar.UpdateStarting += ExecutedClose; LayoutRoot.Children.Add(_updateBar); _updateBar.SizeChanged += OnHeaderBarSizeChanged; }
public ConsoleContainer(IProductUpdateService productUpdateService, IPackageRestoreManager packageRestoreManager) { InitializeComponent(); RootLayout.Children.Add(new ProductUpdateBar(productUpdateService)); RootLayout.Children.Add(new PackageRestoreBar(packageRestoreManager)); }
public GetPackageCommand(IPackageRepositoryFactory repositoryFactory, IVsPackageSourceProvider packageSourceProvider, ISolutionManager solutionManager, IVsPackageManagerFactory packageManagerFactory, IPackageRepository recentPackagesRepository, IHttpClientEvents httpClientEvents, IProductUpdateService productUpdateService) : base(solutionManager, packageManagerFactory, httpClientEvents) { if (repositoryFactory == null) { throw new ArgumentNullException("repositoryFactory"); } if (packageSourceProvider == null) { throw new ArgumentNullException("packageSourceProvider"); } if (recentPackagesRepository == null) { throw new ArgumentNullException("recentPackagesRepository"); } _repositoryFactory = repositoryFactory; _packageSourceProvider = packageSourceProvider; _recentPackagesRepository = recentPackagesRepository; _productUpdateService = productUpdateService; }
internal InstallPackageCommand( ISolutionManager solutionManager, IVsPackageManagerFactory packageManagerFactory, IPackageRepositoryFactory repositoryFactory, IVsPackageSourceProvider packageSourceProvider, IHttpClientEvents httpClientEvents, IProductUpdateService productUpdateService, IVsCommonOperations vsCommonOperations, IDeleteOnRestartManager deleteOnRestartManager, bool networkAvailable) : base(solutionManager, packageManagerFactory, httpClientEvents, vsCommonOperations, deleteOnRestartManager) { _productUpdateService = productUpdateService; _repositoryFactory = repositoryFactory; _packageSourceProvider = packageSourceProvider; DependencyVersion = DependencyVersion.Lowest; if (networkAvailable) { _isNetworkAvailable = isNetworkAvailable(); } else { _isNetworkAvailable = false; } }
public ProductEditorCommandController( // base dependencies IContentDefinitionService contentDefinitionService, IProductService productService, IReadOnlyArticleService articleService, EditorSchemaService editorSchemaService, EditorDataService editorDataService, EditorPartialContentService editorPartialContentService, EditorLocaleService editorLocaleService, // self dependencies IFieldService fieldService, IProductUpdateService productUpdateService, CloneBatchAction cloneBatchAction, DeleteAction deleteAction, PublishAction publishAction) : base(contentDefinitionService, productService, articleService, editorSchemaService, editorDataService, editorPartialContentService, editorLocaleService) { _fieldService = fieldService; _productUpdateService = productUpdateService; _cloneBatchAction = cloneBatchAction; _deleteAction = deleteAction; _publishAction = publishAction; }
private static GetPackageCommand BuildCmdlet( bool isSolutionOpen = true, IPackageRepository recentPackageRepository = null, IProductUpdateService productUpdateService = null, IPackageRepositoryFactory repositoryFactory = null, IVsPackageManagerFactory packageManagerFactory = null, string activeSourceName = "ActiveRepo") { if (packageManagerFactory == null) { var mockFactory = new Mock <IVsPackageManagerFactory>(); mockFactory.Setup(m => m.CreatePackageManager()).Returns(GetPackageManager); packageManagerFactory = mockFactory.Object; } if (recentPackageRepository == null) { recentPackageRepository = new Mock <IPackageRepository>().Object; } return(new GetPackageCommand( repositoryFactory ?? GetDefaultRepositoryFactory(activeSourceName), GetSourceProvider(activeSourceName), TestUtils.GetSolutionManager(isSolutionOpen: isSolutionOpen), packageManagerFactory, recentPackageRepository, null, productUpdateService)); }
private PackageManagerWindow(Project project, DTE dte, IVsPackageManagerFactory packageManagerFactory, IPackageRepositoryFactory repositoryFactory, IPackageSourceProvider packageSourceProvider, IHttpClientEvents httpClientEvents, IProductUpdateService productUpdateService, IPackageRestoreManager packageRestoreManager, ISolutionManager solutionManager, IOptionsPageActivator optionPageActivator, IDeleteOnRestartManager deleteOnRestartManager, IVsShell4 vsRestarter, string dialogParameters) : base(F1Keyword) { InitializeComponent(); #if !VS10 // set unique search guid for VS11 explorer.SearchCategory = new Guid("{85566D5F-E585-411F-B299-5BF006E9F11E}"); #endif _httpClientEvents = httpClientEvents; if (_httpClientEvents != null) { _httpClientEvents.SendingRequest += OnSendingRequest; } _productUpdateService = productUpdateService; _optionsPageActivator = optionPageActivator; _activeProject = project; // replace the ConsoleOutputProvider with SmartOutputConsoleProvider so that we can clear // the console the first time an entry is written to it var providerServices = new ProviderServices(); _smartOutputConsoleProvider = new SmartOutputConsoleProvider(providerServices.OutputConsoleProvider); providerServices.OutputConsoleProvider = _smartOutputConsoleProvider; _providerSettings = providerServices.ProviderSettings; AddUpdateBar(productUpdateService); AddRestoreBar(packageRestoreManager); var restartRequestBar = AddRestartRequestBar(deleteOnRestartManager, vsRestarter); InsertDisclaimerElement(); AdjustSortComboBoxWidth(); PreparePrereleaseComboBox(); SetupProviders( project, dte, packageManagerFactory, repositoryFactory, packageSourceProvider, providerServices, httpClientEvents, solutionManager, packageRestoreManager, restartRequestBar); ProcessDialogParameters(dialogParameters); }
public UpdatePackageCommand(ISolutionManager solutionManager, IVsPackageManagerFactory packageManagerFactory, IHttpClientEvents httpClientEvents, IProductUpdateService productUpdateService) : base(solutionManager, packageManagerFactory, httpClientEvents) { _productUpdateService = productUpdateService; }
public ProductMonitorPresenter(IProductMonitor view, IVendorService vendorService, IProductUpdateService productUpdateService) { _view = view; _vendorService = vendorService; _productUpdateService = productUpdateService; Initialize(); }
private PackageManagerWindow(Project project, DTE dte, IVsPackageManagerFactory packageManagerFactory, IPackageRepositoryFactory repositoryFactory, IPackageSourceProvider packageSourceProvider, IRecentPackageRepository recentPackagesRepository, IHttpClientEvents httpClientEvents, IProductUpdateService productUpdateService, IPackageRestoreManager packageRestoreManager, ISolutionManager solutionManager, IOptionsPageActivator optionPageActivator) : base(F1Keyword) { InitializeComponent(); #if !VS10 // set unique search guid for VS11 explorer.SearchCategory = new Guid("{85566D5F-E585-411F-B299-5BF006E9F11E}"); #endif _httpClientEvents = httpClientEvents; if (_httpClientEvents != null) { _httpClientEvents.SendingRequest += OnSendingRequest; } _productUpdateService = productUpdateService; _optionsPageActivator = optionPageActivator; _activeProject = project; // replace the ConsoleOutputProvider with SmartOutputConsoleProvider so that we can clear // the console the first time an entry is written to it var providerServices = new ProviderServices(); _smartOutputConsoleProvider = new SmartOutputConsoleProvider(providerServices.OutputConsoleProvider); providerServices.OutputConsoleProvider = _smartOutputConsoleProvider; _providerSettings = providerServices.ProviderSettings; AddUpdateBar(productUpdateService); AddRestoreBar(packageRestoreManager); InsertDisclaimerElement(); AdjustSortComboBoxWidth(); PreparePrereleaseComboBox(); SetupProviders( project, dte, packageManagerFactory, repositoryFactory, packageSourceProvider, providerServices, recentPackagesRepository, httpClientEvents, solutionManager, packageRestoreManager); }
public UpdatePackageCommand() : base(ServiceLocator.GetInstance<IVsPackageSourceProvider>(), ServiceLocator.GetInstance<IPackageRepositoryFactory>(), ServiceLocator.GetInstance<SVsServiceProvider>(), ServiceLocator.GetInstance<IVsPackageManagerFactory>(), ServiceLocator.GetInstance<ISolutionManager>(), ServiceLocator.GetInstance<IHttpClientEvents>()) { _productUpdateService = ServiceLocator.GetInstance<IProductUpdateService>(); }
public UpdatePackageCommand() : base(ServiceLocator.GetInstance <IVsPackageSourceProvider>(), ServiceLocator.GetInstance <IPackageRepositoryFactory>(), ServiceLocator.GetInstance <SVsServiceProvider>(), ServiceLocator.GetInstance <IVsPackageManagerFactory>(), ServiceLocator.GetInstance <ISolutionManager>(), ServiceLocator.GetInstance <IHttpClientEvents>()) { _productUpdateService = ServiceLocator.GetInstance <IProductUpdateService>(); }
public ProductUpdateBar(IProductUpdateService productUpdateService) { InitializeComponent(); if (productUpdateService == null) { throw new ArgumentNullException("productUpdateService"); } _productUpdateService = productUpdateService; _productUpdateService.UpdateAvailable += OnUpdateAvailable; }
public ConsoleContainer(IProductUpdateService productUpdateService, IPackageRestoreManager packageRestoreManager) { InitializeComponent(); RootLayout.Children.Add(new ProductUpdateBar(productUpdateService)); RootLayout.Children.Add(new PackageRestoreBar(packageRestoreManager)); // Set DynamicResource binding in code // The reason we can't set it in XAML is that the VsBrushes class come from either // Microsoft.VisualStudio.Shell.10 or Microsoft.VisualStudio.Shell.11 assembly, // depending on whether NuGet runs inside VS10 or VS11. InitializeText.SetResourceReference(TextBlock.ForegroundProperty, VsBrushes.WindowTextKey); }
public UpdatePackageCommand(ISolutionManager solutionManager, IVsPackageManagerFactory packageManagerFactory, IPackageRepositoryFactory repositoryFactory, IVsPackageSourceProvider packageSourceProvider, IHttpClientEvents httpClientEvents, IProductUpdateService productUpdateService, IVsCommonOperations vsCommonOperations) : base(solutionManager, packageManagerFactory, httpClientEvents, vsCommonOperations) { _repositoryFactory = repositoryFactory; _packageSourceProvider = packageSourceProvider; _productUpdateService = productUpdateService; }
public InstallPackageCommand( ISolutionManager solutionManager, IVsPackageManagerFactory packageManagerFactory, IPackageRepositoryFactory repositoryFactory, IVsPackageSourceProvider packageSourceProvider, IHttpClientEvents httpClientEvents, IProductUpdateService productUpdateService, IVsCommonOperations vsCommonOperations, IDeleteOnRestartManager deleteOnRestartManager) : base(solutionManager, packageManagerFactory, httpClientEvents, vsCommonOperations, deleteOnRestartManager) { _productUpdateService = productUpdateService; _repositoryFactory = repositoryFactory; _packageSourceProvider = packageSourceProvider; }
public PackageManagerWindow(DTE dte, IVsUIShell vsUIShell, IVsPackageManagerFactory packageManagerFactory, IPackageRepositoryFactory repositoryFactory, IPackageSourceProvider packageSourceProvider, ProviderServices providerServices, IRecentPackageRepository recentPackagesRepository, IHttpClientEvents httpClientEvents, ISelectedProviderSettings selectedProviderSettings, IProductUpdateService productUpdateService) : base(F1Keyword) { InitializeComponent(); _httpClientEvents = httpClientEvents; if (_httpClientEvents != null) { _httpClientEvents.SendingRequest += OnSendingRequest; } AddUpdateBar(productUpdateService); _vsUIShell = vsUIShell; _selectedProviderSettings = selectedProviderSettings; _productUpdateService = productUpdateService; InsertDisclaimerElement(); AdjustSortComboBoxWidth(); // replace the ConsoleOutputProvider with SmartOutputConsoleProvider so that we can clear // the console the first time an entry is written to it _smartOutputConsoleProvider = new SmartOutputConsoleProvider(providerServices.OutputConsoleProvider); providerServices = new ProviderServices( providerServices.LicenseWindow, providerServices.ProgressWindow, providerServices.ScriptExecutor, _smartOutputConsoleProvider); SetupProviders( dte, packageManagerFactory, repositoryFactory, packageSourceProvider, providerServices, recentPackagesRepository, httpClientEvents); }
public ProductAPIService ( IContentDefinitionService contentDefinitionService, IProductService productService, IProductSearchService productSearchService, IProductUpdateService productUpdateService, IUserProvider userProvider, Func <string, IAction> getAction, IProductRelevanceService relevanceService ) { _contentDefinitionService = contentDefinitionService; _productService = productService; _productSearchService = productSearchService; _productUpdateService = productUpdateService; _userProvider = userProvider; _getAction = getAction; _relevanceService = relevanceService; }
public ProductUpdateBar(IProductUpdateService productUpdateService) { InitializeComponent(); if (productUpdateService == null) { throw new ArgumentNullException("productUpdateService"); } _productUpdateService = productUpdateService; _productUpdateService.UpdateAvailable += OnUpdateAvailable; // Set DynamicResource binding in code // The reason we can't set it in XAML is that the VsBrushes class come from either // Microsoft.VisualStudio.Shell.10 or Microsoft.VisualStudio.Shell.11 assembly, // depending on whether NuGet runs inside VS10 or VS11. UpdateBar.SetResourceReference(Border.BackgroundProperty, VsBrushes.InfoBackgroundKey); UpdateBar.SetResourceReference(Border.BorderBrushProperty, VsBrushes.ActiveBorderKey); StatusMessage.SetResourceReference(TextBlock.ForegroundProperty, VsBrushes.InfoTextKey); }
private PackageManagerWindow(Project project, DTE dte, IVsPackageManagerFactory packageManagerFactory, IPackageRepositoryFactory repositoryFactory, IPackageSourceProvider packageSourceProvider, IHttpClientEvents httpClientEvents, IProductUpdateService productUpdateService, IPackageRestoreManager packageRestoreManager, ISolutionManager solutionManager, IOptionsPageActivator optionPageActivator, IDeleteOnRestartManager deleteOnRestartManager, IVsShell4 vsRestarter, string dialogParameters) : base(F1Keyword) { InitializeComponent(); #if !VS10 // set unique search guid for VS11 explorer.SearchCategory = new Guid("{85566D5F-E585-411F-B299-5BF006E9F11E}"); #endif _httpClientEvents = httpClientEvents; if (_httpClientEvents != null) { _httpClientEvents.SendingRequest += OnSendingRequest; } _productUpdateService = productUpdateService; _optionsPageActivator = optionPageActivator; _activeProject = project; // replace the ConsoleOutputProvider with SmartOutputConsoleProvider so that we can clear // the console the first time an entry is written to it var providerServices = new ProviderServices(); _smartOutputConsoleProvider = new SmartOutputConsoleProvider(providerServices.OutputConsoleProvider); providerServices.OutputConsoleProvider = _smartOutputConsoleProvider; _providerSettings = providerServices.ProviderSettings; _updateAllUIService = providerServices.UpdateAllUIService; providerServices.ProgressWindow.UpgradeNuGetRequested += (_, __) => { Close(); productUpdateService.Update(); }; AddUpdateBar(productUpdateService); AddRestoreBar(packageRestoreManager); var restartRequestBar = AddRestartRequestBar(deleteOnRestartManager, vsRestarter); InsertDisclaimerElement(); AdjustSortComboBoxWidth(); PreparePrereleaseComboBox(); InsertUpdateAllButton(providerServices.UpdateAllUIService); SetupProviders( project, dte, packageManagerFactory, repositoryFactory, packageSourceProvider, providerServices, httpClientEvents, solutionManager, packageRestoreManager, restartRequestBar); ProcessDialogParameters(dialogParameters); }
public FindPackageCommand() : base() { _productUpdateService = ServiceLocator.GetInstance<IProductUpdateService>(); }
public ConsoleContainer(IProductUpdateService productUpdateService) { InitializeComponent(); RootLayout.Children.Add(new ProductUpdateBar(productUpdateService)); }
public FindPackageCommand() : base() { _productUpdateService = ServiceLocator.GetInstance <IProductUpdateService>(); }
private static GetPackageCommand BuildCmdlet( bool isSolutionOpen = true, IProductUpdateService productUpdateService = null, IPackageRepositoryFactory repositoryFactory = null, IVsPackageManagerFactory packageManagerFactory = null, string activeSourceName = "ActiveRepo") { if (packageManagerFactory == null) { var mockFactory = new Mock<IVsPackageManagerFactory>(); mockFactory.Setup(m => m.CreatePackageManager()).Returns(() => GetPackageManager()); packageManagerFactory = mockFactory.Object; } return new GetPackageCommand( repositoryFactory ?? GetDefaultRepositoryFactory(activeSourceName), GetSourceProvider(activeSourceName), TestUtils.GetSolutionManager(isSolutionOpen: isSolutionOpen), packageManagerFactory, null, productUpdateService); }
public UpdateController(IProductUpdateService productUpdateService) { _productUpdateService = productUpdateService; }
private void AddUpdateBar(IProductUpdateService productUpdateService) { var updateBar = new ProductUpdateBar(productUpdateService); updateBar.UpdateStarting += ExecutedClose; LayoutRoot.Children.Add(updateBar); updateBar.SizeChanged += OnHeaderBarSizeChanged; }