private string CalculateInterval(double value) { ObservationBandItem <double> item = items.Where(i => value >= i.LowValue && value < i.HighValue).FirstOrDefault(); if (item != null) { return(item.HeaderBandName); } return(""); }
protected override object GetBandValue(CancellationToken cancellationToken, Dictionary <string, dynamic> row) { dynamic value; if (row.TryGetValue(base.BandName, out value) && value is long) { long observation = (long)value; ObservationBandItem <long> item = items.Where(i => observation >= i.LowValue && observation < i.HighValue).FirstOrDefault(); if (item != null) { return(item.HeaderBandName); } } return(null); }
protected override object GetBandValue(CancellationToken cancellationToken, Dictionary <string, dynamic> row) { const string observationRefCd = "observationRefCd"; const string testMean = "testMean"; dynamic value; if (row.TryGetValue(observationRefCd, out value) && value.ToString() == base.BandName) { if (row.TryGetValue(testMean, out value) && value is double) { double observation = (double)value; ObservationBandItem <double> item = items.Where(i => observation >= i.LowValue && observation < i.HighValue).FirstOrDefault(); if (item != null) { return(item.HeaderBandName); } } } return(null); }