public virtual void Visit(IAggregation aggregation) { }
public virtual void Visit(IAggregation aggregation) { }
public static void Add <T>(this IAggregation <T> key, T entity, Installation installation = Installation.Default) => key.Manager <IAggregation <T>, T>().Add(entity, installation);
public static void AddAvgAggregation <T>(this IAggregation agg, Expression <Func <T, object> > fieldExpression) { var fieldName = ExpressionHelper.GetPropertyName(fieldExpression); agg.Aggregations["Avg"] = new AvgAggregation(fieldName); }
private static void CheckAggregation(IAggregation aggregation, IAggregationData aggregationData, IMeasure measure) { aggregation.Match <object>( (arg) => { measure.Match <object>( (arg1) => { if (!(aggregationData is ISumDataDouble)) { throw new ArgumentException(CreateErrorMessageForAggregation(aggregation, aggregationData)); } return(null); }, (arg1) => { if (!(aggregationData is ISumDataLong)) { throw new ArgumentException(CreateErrorMessageForAggregation(aggregation, aggregationData)); } return(null); }, (arg1) => { throw new ArgumentException(); }); return(null); }, (arg) => { if (!(aggregationData is ICountData)) { throw new ArgumentException(CreateErrorMessageForAggregation(aggregation, aggregationData)); } return(null); }, (arg) => { if (!(aggregationData is IMeanData)) { throw new ArgumentException(CreateErrorMessageForAggregation(aggregation, aggregationData)); } return(null); }, (arg) => { if (!(aggregationData is IDistributionData)) { throw new ArgumentException(CreateErrorMessageForAggregation(aggregation, aggregationData)); } return(null); }, (arg) => { measure.Match <object>( (arg1) => { if (!(aggregationData is ILastValueDataDouble)) { throw new ArgumentException(CreateErrorMessageForAggregation(aggregation, aggregationData)); } return(null); }, (arg1) => { if (!(aggregationData is ILastValueDataLong)) { throw new ArgumentException(CreateErrorMessageForAggregation(aggregation, aggregationData)); } return(null); }, (arg1) => { throw new ArgumentException(); }); return(null); }, (arg) => { throw new ArgumentException(); }); }
private static IView CreateCumulativeView( IViewName name, IMeasure measure, IAggregation aggregation, List <TagKey> keys) { return(View.Create(name, VIEW_DESCRIPTION, measure, aggregation, keys)); }
public CompositeDimensionAggregationVisitor(int segmentId, List <GLRecord> data, IAggregation <T1> aggregation, IEnumerable <T2> memberAncestors) : base(segmentId, data, aggregation, memberAncestors) { }
public static IView Create(IViewName name, String description, IMeasure measure, IAggregation aggregation, IList <ITagKey> columns) { var set = new HashSet <ITagKey>(columns); if (set.Count != columns.Count) { throw new ArgumentException("Columns have duplicate."); } return(new View( name, description, measure, aggregation, new List <ITagKey>(columns).AsReadOnly())); }