Exemple #1
0
 protected void OnMessageEvent(MessageDomainEventArgs domainEventArgs)
 {
     if (DomainMessageHanler != null)
     {
         DomainMessageHanler(this, domainEventArgs);
     }
 }
Exemple #2
0
        private void TryToSend(IPhoneInfo phoneInfo)
        {
            Monitor.Enter(synclock);

            MessageDomainEventArgs domainEventArgs = new MessageDomainEventArgs();

            domainEventArgs.phoneInfo = phoneInfo;
            try
            {
                domainEventArgs = Send(phoneInfo);

                //domainEventArgs.status = Status.Sended;
            }
            catch (Exception ex)
            {
                //log.LogError("Message not sended :", ex);
                domainEventArgs.status      = Status.NotSened;
                domainEventArgs.Description = ex.Message;
            }
            Monitor.Exit(synclock);
            OnMessageEvent(domainEventArgs);
        }