public static IPInvokeQueryEndNode <ILookup <TKey, TValue> > ToLookup <T, TKey, TValue>(this IPInvokeObservable <T> @this, Func <T, TKey> keySelector, Func <T, TValue> valueSelector, IEqualityComparer <TKey> comparer) => @this.Aggregate( new Lookup <TKey, TValue>(comparer), (lookup, v) => { lookup.Add(keySelector(v), valueSelector(v)); return(lookup); });
public static IPInvokeQueryEndNode <List <T> > ToList <T>(this IPInvokeObservable <T> @this) => @this.Aggregate( new List <T>(), (list, v) => { list.Add(v); return(list); });
public static IPInvokeQueryEndNode <Dictionary <TKey, TValue> > ToDictionary <T, TKey, TValue>(this IPInvokeObservable <T> @this, Func <T, TKey> keySelector, Func <T, TValue> valueSelector, IEqualityComparer <TKey> comparer) => @this.Aggregate( new Dictionary <TKey, TValue>(comparer), (dict, v) => { dict.Add(keySelector(v), valueSelector(v)); return(dict); });
public static IPInvokeQueryEndNode <float?> Max <T>(this IPInvokeObservable <T> @this, Func <T, float?> func) => @this.Aggregate( default(float?), (accumulate, v) => { var value = func(v); return((value > accumulate) ? value : accumulate); });
public static IPInvokeQueryEndNode <decimal?> Min <T>(this IPInvokeObservable <T> @this, Func <T, decimal?> func) => @this.Aggregate( default(decimal?), (accumulate, v) => { var value = func(v); return((value < accumulate) ? value : accumulate); });
public static IPInvokeQueryEndNode <float> Max <T>(this IPInvokeObservable <T> @this, Func <T, float> func) => @this.Aggregate( default(float?), (accumulate, v) => { var value = func(v); return((value > accumulate) ? value : accumulate); }, accumulate => accumulate ?? throw new InvalidOperationException());
public static IPInvokeQueryEndNode <TAccumulate> Aggregate <T, TAccumulate>(this IPInvokeObservable <T> @this, TAccumulate seed, Func <TAccumulate, T, TAccumulate> func) => @this.Aggregate(seed, func, x => x);
public static IPInvokeQueryEndNode <T> Aggregate <T>(this IPInvokeObservable <T> @this, Func <T, T, T> func) => @this.Aggregate(default(T), func);
public static IPInvokeQueryEndNode <double> Max(this IPInvokeObservable <double> @this) => @this.Aggregate( default(double?), (accumulate, v) => (v > accumulate) ? v : accumulate, accumulate => accumulate ?? throw new InvalidOperationException());
public static IPInvokeQueryEndNode <float?> Max(this IPInvokeObservable <float?> @this) => @this.Aggregate( default(float?), (accumulate, v) => (v > accumulate) ? v : accumulate);
public static IPInvokeQueryEndNode <decimal?> Min(this IPInvokeObservable <decimal?> @this) => @this.Aggregate( default(decimal?), (accumulate, v) => (v < accumulate) ? v : accumulate);
public static IPInvokeQueryEndNode <float> Min(this IPInvokeObservable <float> @this) => @this.Aggregate( default(float?), (accumulate, v) => (v < accumulate) ? v : accumulate, accumulate => accumulate ?? throw new InvalidOperationException());