コード例 #1
0
 /// <summary>
 /// Creates a new query that computes the sum of a sequence of int values in parallel.
 /// </summary>
 /// <param name="query">A query whose sequence of int values to calculate the sum of.</param>
 /// <returns>A parallel query that returns the sum of the values in the sequence.</returns>
 public static IParallelQueryExpr <int> Sum(this IParallelQueryExpr <IEnumerable <int> > query)
 {
     return(new ParallelQueryExpr <int>(QExpr.NewSum(query.Expr)));
 }
コード例 #2
0
 /// <summary>
 /// Creates a new query that computes the sum of a sequence of Long values.
 /// </summary>
 /// <param name="query">A query whose sequence of Long values to calculate the sum of.</param>
 /// <returns>A query that returns the sum of the values in the sequence.</returns>
 public static IQueryExpr <long> Sum(this IQueryExpr <IEnumerable <long> > query)
 {
     return(new QueryExpr <long>(QExpr.NewSum(query.Expr)));
 }