示例#1
0
 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;
 }
示例#2
0
        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);
        }