public override bool Equals(object obj) { AggregatedDatesKey o = obj as AggregatedDatesKey; if (o == null) { return(false); } IEnumerable <Location> tloc = this.EventLocations.Select(el => el.Location); IEnumerable <Location> oloc = o.EventLocations.Select(el => el.Location); return(this.StudyEventsTimeTableKindCode == o.StudyEventsTimeTableKindCode && TimeSpan.Equals(this.Start, o.Start) && TimeSpan.Equals(this.End, o.End) && string.Equals(this.Subject, o.Subject) && tloc.Count() == oloc.Count() && !tloc.Except(oloc).Any() && this.ContingentUnits.Count() == o.ContingentUnits.Count() && !this.ContingentUnits.Except(o.ContingentUnits).Any()); }
public AggregatedDates(AggregatedContingent g, LanguageCode language) { Key = new AggregatedDatesKey(g, language); Date = g.Key.Start.Date; }