Exemple #1
0
        public async Task <BinaryDownloadStream> OpenDownloadStreamAsync(string id)
        {
            var(success, stream) =
                await BinaryDownloadStream.OpenAsync(_maps, _chunks, _maxChunkLenght, id, _nrwl);

            return(success ? stream : null);
        }
        public FileDownloadStream(BinaryDownloadStream bds, IMongoCollection <Element> elements, string id)
        {
            var fSearch = elements.Find(x => x.ID == id && x.Removed == false).ToList();

            if (fSearch.Count == 0)
            {
                throw new MdbfsElementNotFoundException();
            }
            _file = fSearch.First();
            _bds  = bds;
        }
Exemple #3
0
 public BinaryDownloadStream OpenDownloadStream(string id)
 {
     var(success, stream) =
         BinaryDownloadStream.Open(_maps, _chunks, _maxChunkLenght, id, _nrwl);
     return(success ? stream : null);
 }