From ab47a013859838cfd7ee94bee9ea1b6ea4b6c191 Mon Sep 17 00:00:00 2001 From: James Schafer Date: Sun, 11 Jun 2017 09:01:30 -0400 Subject: [PATCH] Created Initial NotificationEmailGenerator for reading a populating an EmailTemplate. --- Melody49Notifier/EmailTemplate.html | 164 ++++++++++++++++++ .../INotificationEmailGenerator.cs | 14 ++ .../NotificationEmailGenerator.cs | 26 +++ 3 files changed, 204 insertions(+) create mode 100644 Melody49Notifier/EmailTemplate.html create mode 100644 Melody49Notifier/Notification/INotificationEmailGenerator.cs create mode 100644 Melody49Notifier/Notification/NotificationEmailGenerator.cs diff --git a/Melody49Notifier/EmailTemplate.html b/Melody49Notifier/EmailTemplate.html new file mode 100644 index 0000000..5195858 --- /dev/null +++ b/Melody49Notifier/EmailTemplate.html @@ -0,0 +1,164 @@ + + + + Chakeres Theatres, Inc. + + + + + + + + +
+ + + + \ No newline at end of file diff --git a/Melody49Notifier/Notification/INotificationEmailGenerator.cs b/Melody49Notifier/Notification/INotificationEmailGenerator.cs new file mode 100644 index 0000000..5f8cdfd --- /dev/null +++ b/Melody49Notifier/Notification/INotificationEmailGenerator.cs @@ -0,0 +1,14 @@ +using System; +using System.Collections.Generic; +using System.Linq; +using System.Text; +using System.Threading.Tasks; +using Melody49Notifier.Models; + +namespace Melody49Notifier.Notification +{ + public interface INotificationEmailGenerator + { + string CreateFromTemplate(TheaterSchedule currentTheaterSchedule); + } +} diff --git a/Melody49Notifier/Notification/NotificationEmailGenerator.cs b/Melody49Notifier/Notification/NotificationEmailGenerator.cs new file mode 100644 index 0000000..a92aa3c --- /dev/null +++ b/Melody49Notifier/Notification/NotificationEmailGenerator.cs @@ -0,0 +1,26 @@ +using System; +using System.Collections.Generic; +using System.Linq; +using System.Text; +using System.Threading.Tasks; +using Melody49Notifier.Models; +using Microsoft.Azure.WebJobs.Host; +using System.IO; + +namespace Melody49Notifier.Notification +{ + public class NotificationEmailGenerator : INotificationEmailGenerator + { + public NotificationEmailGenerator(TraceWriter log) + { + Log = log; + } + + public TraceWriter Log { get; } + + public string CreateFromTemplate(TheaterSchedule currentTheaterSchedule) + { + return File.ReadAllText("EmailTemplate.html"); + } + } +}