Пример #1
0
        public override void RegisterFile(string fileName, int blockCount, FileIdentifier id)
        {
            var file = new AsyncBlockCacheFile(fileName, blockCount, id, this);

            if (!_cache.TryAdd(id, file))
            {
                throw new NotImplementedException("We couldnt' add the file which seems like something has gone wrong");
            }
        }
Пример #2
0
 public AsyncBlockManager(AsyncBlockCacheFile cacheFile) => _cacheFile = cacheFile;