private static AggregateFunction AggregateFunctionFromKnownFunction(KnownFunction function) { switch (function) { case KnownFunction.Average: return(AggregateFunctions.Average); case KnownFunction.Count: return(AggregateFunctions.Count); case KnownFunction.Max: return(AggregateFunctions.Max); case KnownFunction.Min: return(AggregateFunctions.Min); case KnownFunction.Product: return(AggregateFunctions.Product); case KnownFunction.StdDev: return(AggregateFunctions.StdDev); case KnownFunction.StdDevP: return(AggregateFunctions.StdDevP); case KnownFunction.Var: return(AggregateFunctions.Var); case KnownFunction.VarP: return(AggregateFunctions.VarP); default: return(AggregateFunctions.Sum); } }
private static bool AggregateFunctionEqualsKnownFunction(AggregateFunction aggregateFunction, KnownFunction function) { switch (function) { case KnownFunction.Average: return(aggregateFunction is AverageAggregateFunction); case KnownFunction.Count: return(aggregateFunction is CountAggregateFunction); case KnownFunction.Max: return(aggregateFunction is MaxAggregateFunction); case KnownFunction.Min: return(aggregateFunction is MinAggregateFunction); case KnownFunction.Product: return(aggregateFunction is ProductAggregateFunction); case KnownFunction.StdDev: return(aggregateFunction is StdDevAggregateFunction); case KnownFunction.StdDevP: return(aggregateFunction is StdDevPAggregateFunction); case KnownFunction.Var: return(aggregateFunction is VarAggregateFunction); case KnownFunction.VarP: return(aggregateFunction is VarPAggregateFunction); default: return(aggregateFunction is SumAggregateFunction); } }