public Notification(INotificationContact sender, INotificationContent content) { this.Sender = sender; this.Content = content; this.Deliveries = new List <INotificationDelivery>(); this.Attachments = new List <NotificationAttachment>(); }
private static EmailNotificationContact CreateEmailNotificationContact(INotificationContact contact) { if (contact is EmailNotificationContact emailContact) { return(emailContact); } throw new NotSupportedException($"Only {typeof(EmailNotificationContact)}'s are supported"); }