/// <summary> /// For testing purposes only. /// </summary> internal SymbolSearchUpdateEngine( ISymbolSearchLogService logService, IRemoteControlService remoteControlService, IDelayService delayService, IIOService ioService, IPatchService patchService, IDatabaseFactoryService databaseFactoryService, Func <Exception, bool> reportAndSwallowException) { _delayService = delayService; _ioService = ioService; _logService = logService; _remoteControlService = remoteControlService; _patchService = patchService; _databaseFactoryService = databaseFactoryService; _reportAndSwallowException = reportAndSwallowException; }
/// <summary> /// For testing purposes only. /// </summary> internal SymbolSearchUpdateEngine( ISymbolSearchLogService logService, IRemoteControlService remoteControlService, IDelayService delayService, IIOService ioService, IPatchService patchService, IDatabaseFactoryService databaseFactoryService, Func<Exception, bool> reportAndSwallowException, CancellationToken updateCancellationToken) { _delayService = delayService; _ioService = ioService; _logService = logService; _remoteControlService = remoteControlService; _patchService = patchService; _databaseFactoryService = databaseFactoryService; _reportAndSwallowException = reportAndSwallowException; _updateCancellationToken = updateCancellationToken; }
/// <summary> /// For testing purposes only. /// </summary> internal SymbolSearchService( Workspace workspace, IPackageInstallerService installerService, IRemoteControlService remoteControlService, ILogService logService, IDelayService delayService, IIOService ioService, IPatchService patchService, IDatabaseFactoryService databaseFactoryService, string localSettingsDirectory, Func<Exception, bool> reportAndSwallowException, CancellationTokenSource cancellationTokenSource) : base(workspace, ServiceComponentOnOffOptions.SymbolSearch, AddImportOptions.SuggestForTypesInReferenceAssemblies, AddImportOptions.SuggestForTypesInNuGetPackages) { if (remoteControlService == null) { // If we can't access the file update service, then there's nothing we can do. return; } _workspace = workspace; _installerService = installerService; _delayService = delayService; _ioService = ioService; _logService = logService; _remoteControlService = remoteControlService; _patchService = patchService; _databaseFactoryService = databaseFactoryService; _localSettingsDirectory = localSettingsDirectory; _reportAndSwallowException = reportAndSwallowException; _cancellationTokenSource = cancellationTokenSource; _cancellationToken = _cancellationTokenSource.Token; }
/// <summary> /// For testing purposes only. /// </summary> internal SymbolSearchService( Workspace workspace, IPackageInstallerService installerService, IRemoteControlService remoteControlService, ILogService logService, IDelayService delayService, IIOService ioService, IPatchService patchService, IDatabaseFactoryService databaseFactoryService, string localSettingsDirectory, Func <Exception, bool> reportAndSwallowException, CancellationTokenSource cancellationTokenSource) { if (remoteControlService == null) { // If we can't access the file update service, then there's nothing we can do. return; } _workspace = workspace; _installerService = installerService; _delayService = delayService; _ioService = ioService; _logService = logService; _remoteControlService = remoteControlService; _patchService = patchService; _databaseFactoryService = databaseFactoryService; _reportAndSwallowException = reportAndSwallowException; _cacheDirectoryInfo = new DirectoryInfo(Path.Combine( localSettingsDirectory, "PackageCache", string.Format(Invariant($"Format{_dataFormatVersion}")))); // _databaseFileInfo = new FileInfo(Path.Combine(_cacheDirectoryInfo.FullName, "NuGetCache.txt")); _cancellationTokenSource = cancellationTokenSource; _cancellationToken = _cancellationTokenSource.Token; }
/// <summary> /// For testing purposes only. /// </summary> internal SymbolSearchService( Workspace workspace, IPackageInstallerService installerService, IRemoteControlService remoteControlService, ILogService logService, IDelayService delayService, IIOService ioService, IPatchService patchService, IDatabaseFactoryService databaseFactoryService, string localSettingsDirectory, Func <Exception, bool> reportAndSwallowException, CancellationTokenSource cancellationTokenSource) : base(workspace, ServiceComponentOnOffOptions.SymbolSearch, AddImportOptions.SuggestForTypesInReferenceAssemblies, AddImportOptions.SuggestForTypesInNuGetPackages) { if (remoteControlService == null) { // If we can't access the file update service, then there's nothing we can do. return; } _workspace = workspace; _installerService = installerService; _delayService = delayService; _ioService = ioService; _logService = logService; _remoteControlService = remoteControlService; _patchService = patchService; _databaseFactoryService = databaseFactoryService; _localSettingsDirectory = localSettingsDirectory; _reportAndSwallowException = reportAndSwallowException; _cancellationTokenSource = cancellationTokenSource; _cancellationToken = _cancellationTokenSource.Token; }