Пример #1
0
        private static IPackageSearchRemoteControlService CreateRemoteControlService(VSShell.SVsServiceProvider serviceProvider)
        {
            var vsService = serviceProvider.GetService(typeof(SVsRemoteControlService));
            if (vsService == null)
            {
                // If we can't access the file update service, then there's nothing we can do.
                return null;
            }

            return new RemoteControlService(vsService);
        }
        public VisualStudioSymbolSearchService(
            VisualStudioWorkspaceImpl workspace,
            VSShell.SVsServiceProvider serviceProvider)
            : base(workspace, SymbolSearchOptions.Enabled,
                              SymbolSearchOptions.SuggestForTypesInReferenceAssemblies,
                              SymbolSearchOptions.SuggestForTypesInNuGetPackages)
        {
            _workspace = workspace;
            _installerService = workspace.Services.GetService<IPackageInstallerService>();
            _localSettingsDirectory = new ShellSettingsManager(serviceProvider).GetApplicationDataFolder(ApplicationDataFolder.LocalSettings);

            _logService = new LogService((IVsActivityLog)serviceProvider.GetService(typeof(SVsActivityLog)));
        }
Пример #3
0
 public PackageSearchService(VSShell.SVsServiceProvider serviceProvider, IPackageInstallerService installerService)
     : this(installerService, 
            CreateRemoteControlService(serviceProvider),
            new LogService((IVsActivityLog)serviceProvider.GetService(typeof(SVsActivityLog))),
            new DelayService(),
            new IOService(),
            new PatchService(),
            new DatabaseFactoryService(),
            new ShellSettingsManager(serviceProvider).GetApplicationDataFolder(ApplicationDataFolder.LocalSettings),
            // Report all exceptions we encounter, but don't crash on them.
            FatalError.ReportWithoutCrash,
            new CancellationTokenSource())
 {
     installerService.PackageSourcesChanged += OnPackageSourcesChanged;
     OnPackageSourcesChanged(this, EventArgs.Empty);
 }
Пример #4
0
 public SymbolSearchService(
     VisualStudioWorkspaceImpl workspace,
     VSShell.SVsServiceProvider serviceProvider)
     : this(workspace,
            workspace.Services.GetService<IPackageInstallerService>(), 
            CreateRemoteControlService(serviceProvider),
            new LogService((IVsActivityLog)serviceProvider.GetService(typeof(SVsActivityLog))),
            new DelayService(),
            new IOService(),
            new PatchService(),
            new DatabaseFactoryService(),
            new ShellSettingsManager(serviceProvider).GetApplicationDataFolder(ApplicationDataFolder.LocalSettings),
            // Report all exceptions we encounter, but don't crash on them.
            FatalError.ReportWithoutCrash,
            new CancellationTokenSource())
 {
 }
 public SymbolSearchServiceFactory(
     VSShell.SVsServiceProvider serviceProvider)
 {
     _serviceProvider = serviceProvider;
 }
Пример #6
0
 public PackageSearchServiceFactory(
     VSShell.SVsServiceProvider serviceProvider)
 {
     _serviceProvider = serviceProvider;
 }