internal ANumericValueInCommand(int id, string name, TargetType target, ARange <T> range, MappingSettings rawSettings) : base(id, name, target, rawSettings) { if (!typeof(T).IsNumber()) { throw new Exception("T must be a numeric type."); } MinValue = range.MinValue; MaxValue = range.MaxValue; RawSettings.ValueUIType = ValueUIType.Slider; }
/// <summary> /// Aggregation of "pageCounts" field. /// </summary> /// <returns></returns> public IActionResult PageCount() { FLogger.LogInformation("Return page counts"); return(View(FClient.Search <BookModel>(ASearch => ASearch .Query(AQuery => AQuery .MatchAll()) .Aggregations(AAggregate => AAggregate .Range("pageCounts", ARange => ARange .Field(ABookModel => ABookModel.PageCount) .Ranges(ARanges => ARanges .From(0), ARanges => ARanges .From(200).To(400), ARanges => ARanges .From(400).To(600), ARanges => ARanges .From(600))))))); }
public Range(ARange defARange) { aRanges = new List <ARange> { defARange }; }