public void CombineWith(InfectionData value) { TotalPositive += value.TotalPositive; CurrentPositive += value.CurrentPositive; TotalDeath += value.TotalDeath; TotalSevere += value.TotalSevere; TotalHospedalized += value.TotalHospedalized; TotalHealed += value.TotalHealed; ToatlTests += value.ToatlTests; }
public static InfectionData Combine(IEnumerable <InfectionData> values) { InfectionData result = null; foreach (var value in values) { if (result == null) { result = value; } else { result.CombineWith(value); } } return(result); }