Created
February 14, 2016 12:53
-
-
Save zs40x/2a5ea6da505ac7c96100 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
using Core.Interfaces; | |
using Core.Model; | |
namespace Core.Services | |
{ | |
public class NotificationService | |
{ | |
SendMail sendMail; | |
public NotificationService(SendMail _sendMail) | |
{ | |
sendMail = _sendMail; | |
} | |
public void sendNotificationForUser(User userToNotify) | |
{ | |
string message = "Dear "; | |
message += userToNotify.Username; | |
message += " this is a Notification!"; | |
if(userToNotify.IsPremium) | |
message += " -> Additional Information for Premium Users!"; | |
sendMail.sendMail(userToNotify.EMailAddress, "Notification", message); | |
} | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment