Пример #1
0
        static void Main(string[] args)
        {
            ClassNotifications c = new ClassNotifications();

            ISmsNotify smsNotify = c;

            smsNotify.Notify();

            IEmailNotify emailNotify = c;

            emailNotify.Notify();

            Console.ReadKey();
        }
Пример #2
0
        public void AddNotif(ClassNotification notif)
        {
            List <ClassNotification> temp = ClassNotifications.ToList();

            temp.Add(notif);
        }
Пример #3
0
//--------------------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);
        }