static void Main(string[] args) { // Crear el contacto dueño Contact owner = new Contact("Tomás"); owner.Phone = "+14155238886"; owner.Email = "<<Ingresar email>>"; Phonebook ownerPB = new Phonebook(owner); // Agregar contactos a la lista Contact pablo = ownerPB.AddContact("Pablo"); pablo.Phone = "+5989"; pablo.Email = "<<Ingresar email>>"; Contact guille = ownerPB.AddContact("Guille"); guille.Phone = "+5989"; guille.Email = "<<Ingresar email>>"; // Enviar un correo a algunos contactos ownerPB.Send(new String[] { "Pablo", "Guille" }, new ChannelEmail(), "Probando el envío de email :)"); // Enviar un WhatsApp a algunos contactos ownerPB.Send(new String[] { "Pablo", "Guille" }, new ChannelWhatsApp(), "Probando el envío de WhatsApp :)"); }
static void Main(string[] args) { // Crear el contacto dueño Contact ownerContact = new Contact("Guillermo"); Phonebook ownerBook = new Phonebook(ownerContact); ownerContact.Email = "*****@*****.**"; // Crear la lista de contactos Contact firstContact = ownerBook.AddContact("Contact 1"); Contact secondContact = ownerBook.AddContact("Contact 2"); firstContact.Email = "*****@*****.**"; secondContact.Email = "*****@*****.**"; firstContact.Phone = "+59898242410"; // Agregar contactos a la lista // Enviar un correo a algunos contactos ownerBook.Send(new String[] { "Contact 1" }, new MailChannel(), "Probando el mail"); // Hay que agregar correo y contraseña en MailChannel.cs para que funcione correctamente. // Enviar un WhatsApp a algunos contactos ownerBook.Send(new String[] { "Contact 1" }, new WhatsAppChannel(), "Probando el WhatsApp"); // Enviar un SMS a algunos contactos --> Preguntar por API. }
static void Main(string[] args) { Phonebook ContactList = new Phonebook(new Contact("Martin")); ContactList.AddNewContact("Test", "+59891611429", "3645352517"); List <Contact> FoundContacts = ContactList.Search(new string [] { "Test" }); Console.WriteLine(FoundContacts[0].Name + " " + FoundContacts[0].TwitterID); IMessageChannel TwitterChannel = new TwitterChannel(); IMessageChannel WppChannel = new WppChannel(); ContactList.Send(FoundContacts[0], "BLABLA", TwitterChannel); ContactList.Send(FoundContacts[0], "Hey there! I'm using WhatsAppUCU", WppChannel); }