diff --git a/Melody49Notifier/Models/TheaterScheduleComparer.cs b/Melody49Notifier/Models/TheaterScheduleComparer.cs index f9d3340..8557659 100644 --- a/Melody49Notifier/Models/TheaterScheduleComparer.cs +++ b/Melody49Notifier/Models/TheaterScheduleComparer.cs @@ -18,7 +18,21 @@ public TheaterScheduleComparer(TraceWriter log) public bool AreEqual(TheaterSchedule firstTheaterSchedule, TheaterSchedule secondTheaterSchedule) { - throw new NotImplementedException(); + bool areEqual = true; + + areEqual = areEqual && firstTheaterSchedule.ScheduleDescription == secondTheaterSchedule.ScheduleDescription; + areEqual = areEqual && firstTheaterSchedule.TheaterName == secondTheaterSchedule.TheaterName; + areEqual = areEqual && firstTheaterSchedule.Showings.Count == secondTheaterSchedule.Showings.Count; + + for (int i = 0; i < firstTheaterSchedule.Showings.Count; i++) + { + areEqual = areEqual && firstTheaterSchedule.Showings[i].MovieDescription == secondTheaterSchedule.Showings[i].MovieDescription; + //areEqual = areEqual && firstTheaterSchedule.Showings[i].Screen == secondTheaterSchedule.Showings[i].Screen; + //areEqual = areEqual && firstTheaterSchedule.Showings[i].ShowingScheduleDescription == secondTheaterSchedule.Showings[i].ShowingScheduleDescription; + //areEqual = areEqual && firstTheaterSchedule.Showings[i].ActorDescription == secondTheaterSchedule.Showings[i].ActorDescription; + } + + return areEqual; } } }