Skip to content

Instantly share code, notes, and snippets.

@zs40x
Created February 14, 2016 12:53
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save zs40x/2a5ea6da505ac7c96100 to your computer and use it in GitHub Desktop.
Save zs40x/2a5ea6da505ac7c96100 to your computer and use it in GitHub Desktop.
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