コード例 #1
0
        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;
            }
        }
コード例 #2
0
 private void AddUpdateBar(IProductUpdateService productUpdateService)
 {
     _updateBar = new ProductUpdateBar(productUpdateService);
     _updateBar.UpdateStarting += ExecutedClose;
     LayoutRoot.Children.Add(_updateBar);
     _updateBar.SizeChanged += OnHeaderBarSizeChanged;
 }
コード例 #3
0
        public ConsoleContainer(IProductUpdateService productUpdateService, IPackageRestoreManager packageRestoreManager)
        {
            InitializeComponent();

            RootLayout.Children.Add(new ProductUpdateBar(productUpdateService));
            RootLayout.Children.Add(new PackageRestoreBar(packageRestoreManager));
        }
コード例 #4
0
ファイル: GetPackageCommand.cs プロジェクト: TMFRook/NuGet
        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;
        }
コード例 #5
0
        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;
            }
        }
コード例 #6
0
 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;
 }
コード例 #7
0
        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;
        }
コード例 #8
0
        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));
        }
コード例 #9
0
        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);
        }
コード例 #10
0
 public UpdatePackageCommand(ISolutionManager solutionManager,
                             IVsPackageManagerFactory packageManagerFactory,
                             IHttpClientEvents httpClientEvents,
                             IProductUpdateService productUpdateService)
     : base(solutionManager, packageManagerFactory, httpClientEvents)
 {
     _productUpdateService = productUpdateService;
 }
コード例 #11
0
ファイル: UpdatePackageCommand.cs プロジェクト: larsw/nuget
 public UpdatePackageCommand(ISolutionManager solutionManager, 
     IVsPackageManagerFactory packageManagerFactory,
     IHttpClientEvents httpClientEvents,
     IProductUpdateService productUpdateService)
     : base(solutionManager, packageManagerFactory, httpClientEvents)
 {
     _productUpdateService = productUpdateService;
 }
コード例 #12
0
        public ProductMonitorPresenter(IProductMonitor view, IVendorService vendorService, IProductUpdateService productUpdateService)
        {
            _view = view;
            _vendorService = vendorService;
            _productUpdateService = productUpdateService;

            Initialize();
        }
コード例 #13
0
        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);
        }
コード例 #14
0
 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>();
 }
コード例 #15
0
 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>();
 }
コード例 #16
0
        public ProductUpdateBar(IProductUpdateService productUpdateService)
        {
            InitializeComponent();

            if (productUpdateService == null)
            {
                throw new ArgumentNullException("productUpdateService");
            }

            _productUpdateService = productUpdateService;
            _productUpdateService.UpdateAvailable += OnUpdateAvailable;
        }
コード例 #17
0
        public ProductUpdateBar(IProductUpdateService productUpdateService)
        {
            InitializeComponent();

            if (productUpdateService == null)
            {
                throw new ArgumentNullException("productUpdateService");
            }

            _productUpdateService = productUpdateService;
            _productUpdateService.UpdateAvailable += OnUpdateAvailable;
        }
コード例 #18
0
        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);
        }
コード例 #19
0
 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;
 }
コード例 #20
0
        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);
        }
コード例 #21
0
 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;
 }
コード例 #22
0
 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;
 }
コード例 #23
0
 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;
 }
コード例 #24
0
        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);
        }
コード例 #25
0
        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);
        }
コード例 #26
0
 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;
 }
コード例 #27
0
        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);
        }
コード例 #28
0
        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);
        }
コード例 #29
0
        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);
        }
コード例 #30
0
 public FindPackageCommand()
     : base()
 {
     _productUpdateService = ServiceLocator.GetInstance<IProductUpdateService>();
 }
コード例 #31
0
        public ConsoleContainer(IProductUpdateService productUpdateService)
        {
            InitializeComponent();

            RootLayout.Children.Add(new ProductUpdateBar(productUpdateService));
        }
コード例 #32
0
 public FindPackageCommand()
     : base()
 {
     _productUpdateService = ServiceLocator.GetInstance <IProductUpdateService>();
 }
コード例 #33
0
        public ConsoleContainer(IProductUpdateService productUpdateService)
        {
            InitializeComponent();

            RootLayout.Children.Add(new ProductUpdateBar(productUpdateService));
        }
コード例 #34
0
        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);
        }
コード例 #35
0
 public UpdateController(IProductUpdateService productUpdateService)
 {
     _productUpdateService = productUpdateService;
 }
コード例 #36
0
 private void AddUpdateBar(IProductUpdateService productUpdateService)
 {
     var updateBar = new ProductUpdateBar(productUpdateService);
     updateBar.UpdateStarting += ExecutedClose;
     LayoutRoot.Children.Add(updateBar);
     updateBar.SizeChanged += OnHeaderBarSizeChanged;
 }