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

Commit

Permalink
Created Initial NotificationEmailSender and Added it to the Melody49N…
Browse files Browse the repository at this point in the history
…otifier.
  • Loading branch information
bofirial committed Jun 11, 2017
1 parent 450eae2 commit f3fd512
Show file tree
Hide file tree
Showing 2 changed files with 30 additions and 2 deletions.
7 changes: 5 additions & 2 deletions Melody49Notifier/Melody49Notifier.cs
Original file line number Diff line number Diff line change
Expand Up @@ -3,14 +3,15 @@
using Microsoft.Azure.WebJobs.Host;
using Melody49Notifier.DataAbstraction;
using Melody49Notifier.Models;
using Melody49Notifier.Notification;

namespace Melody49Notifier
{
public static class Melody49Notifier
{

[FunctionName("Melody49Notifier")]
public static void Run([TimerTrigger("0/10 * * * * *")]TimerInfo myTimer, TraceWriter log) //[TimerTrigger("0 0 8-18 * * FRI")]TimerInfo myTimer, TraceWriter log)
public static void Run([TimerTrigger("0/1 * * * * *")]TimerInfo myTimer, TraceWriter log) //[TimerTrigger("0 0 8-18 * * FRI")]TimerInfo myTimer, TraceWriter log)
{
log.Info($"C# Timer trigger function started at: {DateTime.Now}.");

Expand Down Expand Up @@ -45,7 +46,9 @@ private static bool TheaterScheduleHasUpdated(TraceWriter log, out TheaterSchedu

private static void SendNotification(TraceWriter log, TheaterSchedule currentTheaterSchedule)
{
throw new NotImplementedException();
INotificationEmailSender notificationEmailSender = new NotificationEmailSender(log);

notificationEmailSender.SendNotificationEmail(currentTheaterSchedule);
}
}
}
25 changes: 25 additions & 0 deletions Melody49Notifier/Notification/NotificationEmailSender.cs
Original file line number Diff line number Diff line change
@@ -0,0 +1,25 @@
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
using Melody49Notifier.Models;
using Microsoft.Azure.WebJobs.Host;

namespace Melody49Notifier.Notification
{
public class NotificationEmailSender : INotificationEmailSender
{
public NotificationEmailSender(TraceWriter log)
{
Log = log;
}

public TraceWriter Log { get; }

public void SendNotificationEmail(TheaterSchedule currentTheaterSchedule)
{
throw new NotImplementedException();
}
}
}

0 comments on commit f3fd512

Please sign in to comment.