Beispiel #1
0
 public void Assimilate(AnalyticStatisticsItem another)
 {
     if (!SameAs(another))
     {
         throw new Exception("Cannot assimilate another type");
     }
     foreach (AnalyticStatisticsValue value in another.Values)
     {
         Values.Add(value);
     }
 }
Beispiel #2
0
 public void Assimilate(IList <AnalyticStatisticsItem> newcomers)
 {
     foreach (AnalyticStatisticsItem newcomer in newcomers)
     {
         AnalyticStatisticsItem oldie =
             Items.FirstOrDefault(i => i.SameAs(newcomer));
         if (oldie == null)
         {
             Items.Add(newcomer);
         }
         else
         {
             oldie.Assimilate(newcomer);
         }
     }
 }
Beispiel #3
0
 public bool SameAs(AnalyticStatisticsItem another)
 {
     return(Type == another.Type &&
            TargetEngineFamilyType == another.TargetEngineFamilyType &&
            TargetEngineType == another.TargetEngineType);
 }