Пример #1
0
            public static void Register(string email, string password)
            {
                MailService ms = new MailService(email, "User registration", "Body of message...");
                SmsService  ss = new SmsService("111 111 111", "User succesfully registered...");

                try
                {
                    if (ms.ValidEmail())
                    {
                        ms.SendNotification();
                    }
                    ss.SendNotification();
                }
                catch (Exception e)
                {
                    Console.WriteLine(e.Message);
                    throw;
                }
            }