SymbolSearch\Windows\SymbolSearchUpdateEngine.Update.cs (34)
185if (_service._ioService.Exists(databaseFileInfo))
196catch (Exception e) when (_service._reportAndSwallowExceptionUnlessCanceled(e, cancellationToken))
204var delay = _service._delayService.ExpectedFailureDelay;
215if (!_service._ioService.Exists(_cacheDirectoryInfo))
220_service._ioService.Create(_cacheDirectoryInfo);
264var failureDelay = _service._delayService.CatastrophicFailureDelay;
278catch (Exception e) when (_service._reportAndSwallowExceptionUnlessCanceled(e, cancellationToken))
284var failureDelay = _service._delayService.CatastrophicFailureDelay;
298var delay = _service._delayService.UpdateSucceededDelay;
358_service._ioService.WriteAndFlushAllBytes(tempFilePath, bytes);
363if (_service._ioService.Exists(databaseFileInfo))
366_service._ioService.Replace(tempFilePath, databaseFileInfo.FullName, destinationBackupFileName: null, ignoreMetadataErrors: true);
372_service._ioService.Move(tempFilePath, databaseFileInfo.FullName);
380IOUtilities.PerformIO(() => _service._ioService.Delete(new FileInfo(tempFilePath)));
407catch (Exception e) when (_service._reportAndSwallowExceptionUnlessCanceled(e, cancellationToken))
427getDatabaseBytes: () => isBinary ? _service._ioService.ReadAllBytes(databaseFileInfo.FullName) : databaseBytes,
442return (_service._ioService.ReadAllBytes(databaseBinaryFileInfo.FullName), isBinary: true);
449return (_service._ioService.ReadAllBytes(databaseFileInfo.FullName), isBinary: false);
462_service._sourceToDatabase[_source] = new AddReferenceDatabaseWrapper(database);
481catch (Exception e) when (_service._reportAndSwallowExceptionUnlessCanceled(e, cancellationToken))
501if (!_service._ioService.Exists(databaseBinaryFileInfo))
502await WriteDatabaseBinaryFileAsync(_service._sourceToDatabase[_source].Database, databaseFileInfo, cancellationToken).ConfigureAwait(false);
504return _service._delayService.UpdateSucceededDelay;
519var finalBytes = _service._patchService.ApplyPatch(databaseBytes, patchBytes);
532return _service._delayService.UpdateSucceededDelay;
566var result = _service._databaseFactoryService.CreateDatabaseFromBytes(bytes, isBinary);
587using var client = _service._fileDownloaderFactory.CreateClient(HostId, serverPath, pollingMinutes);
620return (element: null, _service._delayService.CachePollDelay);
648catch (Exception e) when (_service._reportAndSwallowExceptionUnlessCanceled(e, cancellationToken))
654return (element: null, _service._delayService.CatastrophicFailureDelay);
670catch (Exception e) when (IOUtilities.IsNormalIOException(e) || _service._reportAndSwallowExceptionUnlessCanceled(e, cancellationToken))
679var delay = _service._delayService.FileWriteDelay;
692_service._reportAndSwallowExceptionUnlessCanceled(new FormatException($"Database element invalid. Missing '{ContentAttributeName}' attribute"), CancellationToken.None);
711_service._reportAndSwallowExceptionUnlessCanceled(new FormatException($"Checksum mismatch: expected != actual. {expectedChecksum} != {actualChecksum}"), CancellationToken.None);