public Task <IAsyncEnumerable <KeyValuePair <TKey, TValue> > > CreateEnumerableAsync(ITransaction tx, Func <TKey, bool> filter, EnumerationMode enumerationMode)
        {
            var source = _state.Where(s => filter(s.Key));

            if (enumerationMode == EnumerationMode.Ordered)
            {
                source = source.OrderBy(s => s.Key);
            }
            var enumerable = new MockAsyncEnumerable <KeyValuePair <TKey, TValue> >(source);

            return(Task.FromResult <IAsyncEnumerable <KeyValuePair <TKey, TValue> > >(enumerable));
        }
        public Task <IAsyncEnumerable <T> > CreateEnumerableAsync(ITransaction tx)
        {
            var enumerable = new MockAsyncEnumerable <T>(_state);

            return(Task.FromResult <IAsyncEnumerable <T> >(enumerable));
        }