Exemplo n.º 1
0
		private void comm_MessageSendFailed(object sender, MessageErrorEventArgs e)
		{
			if (this.MessageSendFailed != null)
			{
				string userDataText = e.Pdu.UserDataText;
				string empty = string.Empty;
				if (e.Pdu is SmsSubmitPdu)
				{
					empty = (e.Pdu as SmsSubmitPdu).DestinationAddress;
				}
				MessageSendErrorEventArgs messageSendErrorEventArg = new MessageSendErrorEventArgs(userDataText, empty, e.Exception, this.GetIdentityName());
				this.MessageSendFailed(this, messageSendErrorEventArg);
			}
		}
Exemplo n.º 2
0
		private void OnMessageSendFailed(OutgoingSmsPdu pdu, Exception exception)
		{
			if (this.MessageSendFailed != null)
			{
				this.LogIt(LogLevel.Info, "Firing async MessageSendFailed event.");
				MessageErrorEventArgs messageErrorEventArg = new MessageErrorEventArgs(pdu, exception);
				this.MessageSendFailed.BeginInvoke(this, messageErrorEventArg, new AsyncCallback(this.AsyncCallback), null);
			}
		}