Esempio n. 1
0
        public void SendWhatsAppMessage(string[] names, string text)
        {
            IMessageChannel messageChannel = new WhatsAppChannel();

            foreach (Contact contact in this.persons)
            {
                foreach (string name in names)
                {
                    if (contact.Name.Equals(name))
                    {
                        Message message = new WhatsAppMessage(this.Owner.Phone, contact.Phone, text);
                        messageChannel.Send(message);
                    }
                }
            }
        }
        public Message Mensajear(Contact owner, Contact to, string content)
        {
            WhatsAppMessage mensaje = new WhatsAppMessage(owner.Phone, to.Phone, content);

            return(mensaje);
        }
Esempio n. 3
0
        public void PerformMessage(string message, string from, Contact to)
        {
            WhatsAppMessage tMessage = new WhatsAppMessage(message, from, to.Phone);

            Send(tMessage);
        }