public bool AQIRoughlyEqual(AQIRecord newObj)
        {
            int thisAQI = 0, newAQI = 0;

            int.TryParse(this.AQI, out thisAQI);
            int.TryParse(newObj.AQI, out newAQI);

            int roughValue = 50;

            return((thisAQI >= (newAQI - roughValue)) && (thisAQI <= (newAQI + roughValue)));
        }
示例#2
0
        public bool IsRiskAQI(AQIRecord record)
        {
            SwitcherDisableLog();
#if RiskRangeEnabled
            int aqi = -1;
            int.TryParse(record.AQI, out aqi);
            return(aqi > thresholds.PM25.AQI);
#else
            return(true);
#endif
        }
        public override bool Equals(object obj)
        {
            AQIRecord aqiObj = obj as AQIRecord;

            if (aqiObj != null)
            {
                return(this.AQIRoughlyEqual(aqiObj) &&
                       this.Area == aqiObj.Area &&
                       this.Position_Name == aqiObj.Position_Name);
            }
            return(base.Equals(obj));
        }