public static AreaCacheDownload Create(IFileCache fileCache) { if (_instance != null) { if (_instance.FileCache.GetType() != fileCache.GetType()) { throw new ArgumentException($"Already initialized with fileCache type {fileCache}"); } return(_instance); } var cacheLookup = CacheFileLookup.Create(new AzureFileCache().ListBoxes()); var t = new AreaCacheDownload(cacheLookup, fileCache); _instance = t; return(t); }
private AreaCacheDownload(CacheFileLookup cacheFileLookup, IFileCache fileCache) { _cacheFileLookup = cacheFileLookup; FileCache = fileCache; }