public override bool Equals(object obj) { AggregatedContingentKey o = obj as AggregatedContingentKey; 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 && DateTime.Equals(this.Start, o.Start) && DateTime.Equals(this.End, o.End) && string.Equals(this.Subject, o.Subject) && tloc.Count() == oloc.Count() && !tloc.Except(oloc).Any()); }
public AggregatedContingent(TimeEventAppointment appointment, LanguageCode language) { Key = new AggregatedContingentKey(appointment, language); Appointment = appointment; }