Пример #1
0
 public static ISymbolCollection <TSource> Scatter <TSource>(
     this ISymbolCollection <IEnumerable <TSource> > source
     )
 {
     return(source.CreateCollectionQuery <TSource>(
                Expression.Call(null,
                                ((MethodInfo)MethodBase.GetCurrentMethod()).MakeGenericMethod(typeof(TSource)), source.Expression)
                ));
 }
Пример #2
0
 public static ISymbolCollection <TResult> Call <TSource, TResult>(
     this ISymbolCollection <TSource> source,
     Expression <Func <TSource, TResult> > call
     )
 {
     return(source.CreateCollectionQuery <TResult>(
                Expression.Call(null,
                                ((MethodInfo)MethodBase.GetCurrentMethod()).MakeGenericMethod(typeof(TSource), typeof(TResult)),
                                new[] { source.Expression, call }
                                )
                ));
 }
Пример #3
0
 public static ISymbolCollection <TResult> IfThenElse <TSource, TResult>(
     this ISymbolCollection <TSource> source,
     Expression <Func <TSource, bool> > ifPredicate,
     Expression <Func <ISymbol <TSource>, ISymbol <TResult> > > thenBlock,
     Expression <Func <ISymbol <TSource>, ISymbol <TResult> > > elseBlock
     )
 {
     return(source.CreateCollectionQuery <TResult>(
                Expression.Call(null,
                                ((MethodInfo)MethodBase.GetCurrentMethod()).MakeGenericMethod(typeof(TSource), typeof(TResult)), source.Expression, ifPredicate, thenBlock, elseBlock)
                ));
 }
Пример #4
0
 public static ISymbolCollection <TAccumulate> Gather <TSource, TReduceKey, TAccumulate>(
     this ISymbolCollection <TSource> source,
     Expression <Func <TSource, TReduceKey> > keySelector,
     TAccumulate seed,
     Expression <Func <TAccumulate, TSource, TAccumulate> > reducer
     )
 {
     return(source.CreateCollectionQuery <TAccumulate>(
                Expression.Call(null,
                                ((MethodInfo)MethodBase.GetCurrentMethod()).MakeGenericMethod(typeof(TSource), typeof(TReduceKey), typeof(TAccumulate)), source.Expression, keySelector, Expression.Constant(seed), reducer)
                ));
 }
Пример #5
0
 public static ISymbol <TResult> Gather <TSource, TResult>(
     this ISymbolCollection <TSource> source,
     Expression <Func <IEnumerable <TSource>, TResult> > reducer
     )
 {
     return(source.CreateQuery <TResult>(
                Expression.Call(null,
                                ((MethodInfo)MethodBase.GetCurrentMethod()).MakeGenericMethod(typeof(TSource), typeof(TResult)),
                                new[] { source.Expression, reducer }
                                )
                ));
 }
Пример #6
0
 public static ISymbolCollection <TResult> Scatter <TSource, TResult>(
     this ISymbolCollection <TSource> source,
     Expression <Func <TSource, IEnumerable <TResult> > > extractor
     )
 {
     return(source.CreateCollectionQuery <TResult>(
                Expression.Call(null,
                                ((MethodInfo)MethodBase.GetCurrentMethod()).MakeGenericMethod(typeof(TSource), typeof(TResult)),
                                new[] { source.Expression, extractor }
                                )
                ));
 }
Пример #7
0
 public static ISymbolCollection <TSource> AsyncCallEx <TSource>(
     this ISymbolCollection <TSource> source,
     Expression <Action <ISymbol <TSource> > > call
     )
 {
     return(source.CreateCollectionQuery <TSource>(
                Expression.Call(null,
                                ((MethodInfo)MethodBase.GetCurrentMethod()).MakeGenericMethod(typeof(TSource)),
                                new[] { source.Expression, call }
                                )
                ));
 }
Пример #8
0
 public static ISymbolCollection <TSource> DoWhile <TSource>(
     this ISymbolCollection <TSource> source,
     Expression <Func <ISymbol <TSource>, ISymbol <TSource> > > body,
     Expression <Func <TSource, bool> > condition
     )
 {
     return(source.CreateCollectionQuery <TSource>(
                Expression.Call(null,
                                ((MethodInfo)MethodBase.GetCurrentMethod()).MakeGenericMethod(typeof(TSource)),
                                new[] { source.Expression, body, condition }
                                )
                ));
 }
Пример #9
0
 public static ISymbol <TAccumulate> Gather <TSource, TAccumulate>(
     this ISymbolCollection <TSource> source,
     TAccumulate seed,
     Expression <Func <TAccumulate, TSource, TAccumulate> > func
     )
 {
     return(source.CreateQuery <TAccumulate>(
                Expression.Call(null,
                                ((MethodInfo)MethodBase.GetCurrentMethod()).MakeGenericMethod(typeof(TSource), typeof(TAccumulate)),
                                new[] { source.Expression, Expression.Constant(seed), func }
                                )
                ));
 }