24 using System.Collections.Generic;
35 private ZipFile _zipFile;
36 private Stream _zipFileStream;
48 _dataProvider = dataProvider;
60 var stream = _dataProvider.Fetch(filePath);
62 if (filePath.EndsWith(
".zip") && stream !=
null)
70 _zipFileStream = stream;
74 catch (ZipException exception)
76 Log.
Error(
"SingleEntryDataCacheProvider.Fetch(): Corrupt file: " + key +
" Error: " + exception);
77 stream.DisposeSafely();
90 public void Store(
string key,
byte[] data)
100 var stream = _dataProvider.Fetch(zipFile);
103 throw new ArgumentException($
"Failed to create source stream {zipFile}");
106 stream.DisposeSafely();
116 _zipFile?.DisposeSafely();
117 _zipFileStream?.DisposeSafely();