Beispiel #1
0
        async Task UpdateTypeStores(string type, MdLocator location)
        {
            await InitDb();

            await _streams.UpdateAsync(type, location).ConfigureAwait(false);

            _dataTreeAddresses[type] = location;
        }
        public async Task <Result <Pointer> > UpdateAsync(string type, MdLocator location)
        {
            var items = _collection.GetAsync()
                        .SkipWhile(c => c.StreamName == type)
                        .Append(new StreamType {
                StreamName = type, MdLocator = location
            });

            return(await _collection.SetAsync(items).ConfigureAwait(false));
        }
        public async Task <Result <Pointer> > AddAsync(string type, MdLocator location)
        {
            var stream = new StreamType
            {
                StreamName = type,
                MdLocator  = location
            };

            return(await _collection.AddAsync(stream).ConfigureAwait(false));
        }