Class IEnumerableExtensions
Wrapper for extension methods on the IEnumerable interface.
Inheritance
IEnumerableExtensions
Assembly: MetricSetTransformers.dll
public static class IEnumerableExtensions
Methods
View Source
Declaration
public static void Add(this IList<TokenOrExpression> tokenOrExpressions, Expression expression)
Parameters
View Source
Declaration
public static void Add(this IList<TokenOrExpression> tokenOrExpressions, string token)
Parameters
View Source
Set of unique items in a sequence.
Declaration
public static ISet<T> AsSet<T>(this IEnumerable<T> items)
Parameters
Returns
Type Parameters
View Source
Return the closure of table
, along with all Expression
nodes in plan
which (in)directly depend on that closure.
Declaration
public static (ISet<Table>, ISet<Expression>) ClosureIn(this Table table, MetricsPlan plan)
Parameters
Returns
View Source
Return the closure of tables
, along with all Expression
nodes in plan
which (in)directly depend on that closure.
Declaration
public static (ISet<Table>, ISet<Expression>) ClosureIn(this IEnumerable<Table> tables, MetricsPlan plan)
Parameters
Returns
View Source
Create a dictionary mapping expression "name" to the "best" (lives in the
highest Table node) candidate for an Expression
object with that name. Use avoidAggregations
to determine
whether to use or avoid the candidate in Aggregation nodes.
Declaration
public static IReadOnlyDictionary<string, ColumnReference> ExpressionNameLookup(this IEnumerable<Expression> expressions, bool avoidAggregations = true)
Parameters
Returns
View Source
Declaration
public static IDictionary<Table, ISet<T>> ExpressionsInTableLookup<T>(this IEnumerable<T> expressions)
where T : Expression
Parameters
Returns
Type Parameters
View Source
Return the element of items
for which selector
has maximum value.
Declaration
public static T MaxBy<T>(this IEnumerable<T> items, Func<T, double> selector)
Parameters
Returns
Type Parameters
View Source
Declaration
public static ISet<ColumnReference> TopColumnReferences(this IEnumerable<Expression> expressions)
Parameters
Returns