Skip to content
This repository has been archived by the owner on Jul 3, 2020. It is now read-only.

Commit

Permalink
Implemented the TheaterScheduleComparer
Browse files Browse the repository at this point in the history
  • Loading branch information
bofirial committed Jun 11, 2017
1 parent 68a5738 commit caa164f
Showing 1 changed file with 15 additions and 1 deletion.
16 changes: 15 additions & 1 deletion Melody49Notifier/Models/TheaterScheduleComparer.cs
Original file line number Diff line number Diff line change
Expand Up @@ -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;
}
}
}

0 comments on commit caa164f

Please sign in to comment.