Beispiel #1
0
        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("");
        }
Beispiel #2
0
        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);
        }
Beispiel #3
0
        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);
        }