public static async Task PrintValues <T>(IChildContextualCreator < CSScope, ContextualStream <T> > subContextFactory) { await subContextFactory.InChild(new CSScope(valueScope: InfiniteIntervalScope.Create(RWScope.Read, 0, null)), async ints => { await TaskCollector.With(async tc => { IAsyncEnumerator <T> enumerator = ints.GetAsyncEnumerator(); while (await tc.Adding(enumerator.MoveNextAsync())) { T value = await tc.Adding(enumerator.GetCurrentAsync()); Console.WriteLine(value); } }); }); }