static void Main(string[] args) { ClassNotifications c = new ClassNotifications(); ISmsNotify smsNotify = c; smsNotify.Notify(); IEmailNotify emailNotify = c; emailNotify.Notify(); Console.ReadKey(); }
public void AddNotif(ClassNotification notif) { List <ClassNotification> temp = ClassNotifications.ToList(); temp.Add(notif); }
//--------------------Add and Remove methods for unit tests------------------ //Convert IEnumerable into a list to add or remove from it //Haven't tested if the changes save or if we need to save them manually public void RemoveNotif(ClassNotification notif) { List <ClassNotification> temp = ClassNotifications.ToList(); temp.Remove(notif); }