예제 #1
0
 /// <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;
 }
예제 #2
0
        /// <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;
        }
예제 #3
0
        /// <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;
        }
예제 #4
0
        /// <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;
        }
예제 #5
0
        /// <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;
        }