public int ComputeIndex(HealthIndex index) { switch (this.calculationMode) { case CalculationMode.Detailed: return(index.GetValue()); default: if (index < (HealthIndex)33) { return(-1); } else if (index >= (HealthIndex)33 && index < (HealthIndex)66) { return(0); } else { return(100); } } }
public HealthIndex ComputeIndex(HealthIndex value) { return(new HealthIndex(value.GetValue(), (this.calculationMode == CalculationMode.Simple) ? false : true)); }
public CountyStatsViewModel(int doctorCount, int patientCount, long healthReportCount, HealthIndex averageHealthIndex) { this.AverageHealthIndex = averageHealthIndex; this.DoctorCount = doctorCount; this.PatientCount = patientCount; this.HealthReportCount = healthReportCount; }