public IdentifiedDate Clone() { var clone = new IdentifiedDate() { Date = this.Date, }; clone.Events.AddRange(this.Events.Select(c => c.Clone())); return(clone); }
internal void Merge(IdentifiedDate value) { var dic = this.Events.ToDictionary(c => (c.Date, c.Country, c.Region, c.Name)); foreach (EventDate edate in value.Events) { var k = (edate.Date, edate.Country, edate.Region, edate.Name); if (!dic.ContainsKey(k)) { var cc = edate.Clone(); this.Events.Add(cc); dic.Add(k, cc); } } }