/// <summary> /// A quick filter method. /// </summary> public async AsyncSequence <T> Where(Func <T, bool> condition) { var seq = await AsyncSequence <T> .Capture(); while (await MoveNextAsync()) { if (condition(Current)) { seq.Return(Current); } } return(seq.Break()); }
internal AsyncSequenceMethodBuilder(AsyncSequence <T> task) { _methodBuilder = AsyncTaskMethodBuilder <T> .Create(); Task = task; }