private bool Load(ILoadMonitor loader) { ProgressStatus status = new ProgressStatus(string.Empty); loader.UpdateProgress(status); bool cached = loader.StreamManager.IsCached(FilePath, CachePath); if (Load(loader, status, cached)) { return(true); } // If loading from the cache failed, rebuild it. if (cached) { // Reset readStream so we don't read corrupt file. _readStream = null; if (Load(loader, status, false)) { return(true); } } return(false); }
private Stream CreateStream(ILoadMonitor loader) { if (_readStream == null) { _readStream = loader.StreamManager.CreatePooledStream(FilePath, false); } return(ReadStream.Stream); }
public ChromCacheJoiner(string cachePath, IPooledStream streamDest, IList<string> cacheFilePaths, ILoadMonitor loader, ProgressStatus status, Action<ChromatogramCache, Exception> completed) : base(cachePath, loader, status, completed) { _destinationStream = streamDest; CacheFilePaths = cacheFilePaths; }
public ChromCacheJoiner(string cachePath, IPooledStream streamDest, IList <string> cacheFilePaths, ILoadMonitor loader, ProgressStatus status, Action <ChromatogramCache, IProgressStatus> completed) : base(cachePath, loader, status, completed) { _destinationStream = streamDest; CacheFilePaths = cacheFilePaths; }
public ChromCacheJoiner(string cachePath, IPooledStream streamDest, IList <string> cacheFilePaths, ILoadMonitor loader, ProgressStatus status, Action <ChromatogramCache, IProgressStatus> completed, bool assumeNegativeChargeInPreV11Caches) : base(cachePath, loader, status, completed) { _destinationStream = streamDest; CacheFilePaths = cacheFilePaths; _assumeNegativeChargeInPreV11Caches = assumeNegativeChargeInPreV11Caches; // Deal with older cache formats where we did not record polarity }
public void Commit(string pathTemp, string pathDestination, IPooledStream streamDest) { if (_textFiles.ContainsKey(pathTemp)) { _textFiles[pathDestination] = _textFiles[pathTemp]; } else if (_binaryFiles.ContainsKey(pathTemp)) { _binaryFiles[pathDestination] = _binaryFiles[pathTemp]; } Delete(pathTemp); }
public ChorusResponseChromDataProvider(SrmDocument document, ChromFileInfo chromFileInfo, IProgressStatus progressStatus, int startPercent, int endPercent, ILoadMonitor loader) : base(chromFileInfo, progressStatus, startPercent, endPercent, loader) { ChromatogramCache.RawData rawData; MsDataFilePath msDataFilePath = (MsDataFilePath)chromFileInfo.FilePath; IPooledStream stream = loader.StreamManager.CreatePooledStream(msDataFilePath.FilePath, false); ChromatogramCache.LoadStructs(stream.Stream, out rawData); var chromCacheFile = rawData.ChromCacheFiles[0]; rawData.ChromCacheFiles = new[] { new ChromCachedFile(chromFileInfo.FilePath, chromCacheFile.Flags, chromCacheFile.FileWriteTime, chromCacheFile.RunStartTime, chromCacheFile.MaxRetentionTime, chromCacheFile.MaxIntensity, chromCacheFile.InstrumentInfoList), }; var cache = new ChromatogramCache("cachePath", rawData, stream); // Not L10N _cachedChromatogramDataProvider = new CachedChromatogramDataProvider(cache, document, chromFileInfo.FilePath, chromFileInfo, null, progressStatus, startPercent, endPercent, loader); }
public void Commit(string pathTemp, string pathDestination, IPooledStream streamDest) { if (_textFiles.ContainsKey(pathTemp)) _textFiles[pathDestination] = _textFiles[pathTemp]; else if (_binaryFiles.ContainsKey(pathTemp)) _binaryFiles[pathDestination] = _binaryFiles[pathTemp]; Delete(pathTemp); }
private Stream CreateStream(ILoadMonitor loader) { if (_readStream == null) _readStream = loader.StreamManager.CreatePooledStream(FilePath, false); return ReadStream.Stream; }