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

Commit

Permalink
Implemented the TheaterScheduleHasUpdated Function in the Melody49Not…
Browse files Browse the repository at this point in the history
…ifier
  • Loading branch information
bofirial committed Jun 10, 2017
1 parent afef9e8 commit f5121ef
Showing 1 changed file with 17 additions and 1 deletion.
18 changes: 17 additions & 1 deletion Melody49Notifier/Melody49Notifier.cs
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,23 @@ public static void Run([TimerTrigger("0/10 * * * * *")]TimerInfo myTimer, TraceW

private static bool TheaterScheduleHasUpdated(TraceWriter log, out TheaterSchedule currentTheaterSchedule)
{
throw new NotImplementedException();
ICurrentTheaterScheduleDataFileManager currentTheaterScheduleDataFileManager = new CurrentTheaterScheduleDataFileManager(log);
ICurrentTheaterScheduleWebRequestManager currentTheaterScheduleWebRequestManager = null;
ITheaterScheduleComparer theaterScheduleComparer = null;

TheaterSchedule currentTheaterScheduleFromFile = currentTheaterScheduleDataFileManager.SelectCurrentTheaterSchedule();
TheaterSchedule currentTheaterScheduleFromWebSite = currentTheaterScheduleWebRequestManager.GetCurrentTheaterSchedule();

currentTheaterSchedule = currentTheaterScheduleFromWebSite;

if (!theaterScheduleComparer.AreEqual(currentTheaterScheduleFromFile, currentTheaterScheduleFromWebSite))
{
currentTheaterScheduleDataFileManager.UpdateCurrentTheaterSchedule(currentTheaterScheduleFromWebSite);

return false;
}

return true;
}

private static void SendNotification(TraceWriter log, TheaterSchedule currentTheaterSchedule)
Expand Down

0 comments on commit f5121ef

Please sign in to comment.