常用方法
常用方法
常用方法
常用方法
/// <summary> /// https://gist.github.com/Manuel-S/1fad0455d849e1e2df6c /// </summary> public static IObservable <List <TSource> > BufferWhile <TSource>( this IObservable <TSource> source, Func <TSource, bool> condition) { return(source.AggregateUntil( () => new List <TSource>(), (list, value) => { list.Add(value); return list; }, list => !condition(list[list.Count - 1]))); }