static void Main(string[] args)
        {
            Contact owner = new Contact("Felipe");

            owner.Email = "*****@*****.**";
            owner.Phone = "+59899123456";

            Contact nachito = new Contact("Nachito");

            nachito.Email = "*****@*****.**";
            nachito.Phone = "+59899512326";

            string [] nombres = new string[] { nachito.Name, owner.Name };   //uso mi contacto para hacer las pruebas.
                                                                             // el owner no estaría en agenda.

            List <Contact> contactos = new List <Contact>()
            {
                owner, nachito
            };

            Phonebook agenda = new Phonebook(owner);

            WhatsAppChannel WhatsApp = new WhatsAppChannel();

            agenda.Enviar(WhatsApp, "hola", nombres);

            MailChannel Mail = new MailChannel();

            //la contraseña, el asunto y el remitente del mail estan hardcodeadados en la clase mailchannel.
            //Creo que no es pertinente al ejercicio parametrizarlos.
            agenda.Enviar(Mail, "prueba", nombres);
        }
예제 #2
0
        static void Main(string[] args)
        {
            Contact dueño     = new Contact("NombreDueño", "0999999", "dueñ[email protected]");
            Contact contacto1 = new Contact("Nombre1", "+59899742172", "*****@*****.**");

            contacto1.TwitterID = "13960658118";
            Contact contacto2 = new Contact("Nombre2", "+59899742172", "*****@*****.**");

            contacto2.TwitterID = "2230668516";

            Phonebook lista = new Phonebook(dueño);

            lista.AddContact(contacto1);
            lista.AddContact(contacto2);

            Message mensajeW = new Message(contacto1, contacto2);

            mensajeW.Text = "Hola";
            WhatsAppChannel wpp = new WhatsAppChannel();

            wpp.Send(mensajeW);

            Message mensajeT = new Message(contacto1, contacto2);

            mensajeT.Text = "Hola";
            TwitterChannel twitter = new TwitterChannel();

            twitter.Send(mensajeT);

            // Crear el contacto dueño

            // Crear la lista de contactos

            // Agregar contactos a la lista

            // Enviar un correo a algunos contactos

            // Enviar un WhatsApp a algunos contactos

            // Enviar un SMS a algunos contactos
        }