Beispiel #1
0
        public static (IStream <T>, string) CreateBlankStream <T>()
        {
            var channel = Channel.CreateUnbounded <object?>();
            var stream  = new FakeStream <T>(channel.Reader.ReadAllAsync().Select(x => FakeConfiguration.Deserialize <T>(x)));
            var name    = $"-{Guid.NewGuid()}";

            blankStreams[name] = channel.Writer;
            return(stream, name);
        }
Beispiel #2
0
 public FakeStreamAsyncEnumerable(FakeStream <T> stream, Func <T, bool> filter, bool replay)
 {
     _stream = stream;
     Replay  = replay;
     Filter  = filter;
 }