private static ITimeSeriesAggregationOperations Func2(ITimePeriodBuilder builder, GroupingInterval interval, InterpolationType interpolation, bool byTag) { var aggregationOperations = Func(builder, interval); if (byTag) { aggregationOperations.ByTag(); } if (interpolation != InterpolationType.None) { aggregationOperations.WithOptions(new TimeSeriesAggregationOptions { Interpolation = interpolation }); } return(aggregationOperations); }
private static ITimeSeriesAggregationOperations Func(ITimePeriodBuilder builder, GroupingInterval interval) { return(interval == GroupingInterval.Month ? builder.Months(1) : interval == GroupingInterval.Day ? builder.Days(1) : interval == GroupingInterval.Hour ? builder.Hours(1) : builder.Years(1)); }