public static void Main()
Console.WriteLine("Hello World");
public interface INotificationSender<T>
void Send(T notification);
public class EmailNotificationSender : INotificationSender<Email>
private readonly IEmailSender _emailSender;
public EmailNotificationSender(IEmailSender es) { _emailSender = es; }
public void Send(Email notification) { _emailSender.SendEmail(notification); }
public class PushNotificationSender : INotificationSender<Push>
private readonly IPushSender _pushSender;
public PushNotificationSender(IPushSender ps) { _pushSender = ps; }
public void Send(Push notification) { _pushSender.SendPush(notification); }
public interface IEmailSender { void SendEmail(Email e); }
public interface IPushSender { void SendPush(Push p); }