private void RaiseParserExceptionEvent(Exception exception) { if (ParserException == null) { return; } ParserExceptionEventArgs e = new ParserExceptionEventArgs(exception); foreach (EventHandler <ParserExceptionEventArgs> del in ParserException.GetInvocationList()) { del.BeginInvoke(this, e, AsyncCallBackRaiseParserExceptionEvent, del); } }
private void RaiseParserExceptionEvent(Exception exception) { if (ParserException == null) { return; } ParserExceptionEventArgs e = new ParserExceptionEventArgs(exception); foreach (EventHandler <ParserExceptionEventArgs> del in ParserException.GetInvocationList()) { #if NET40 del.BeginInvoke(this, e, AsyncCallBackRaiseParserExceptionEvent, del); #else System.Threading.Tasks.Task.Run(() => del.Invoke(this, e)); #endif } }
private void ParserExceptionEventHandler(object sender, ParserExceptionEventArgs e) { EndSession(SmppSessionCloseReason.TcpIpSessionError, e.Exception); }
private void RaiseParserExceptionEvent(Exception exception) { if (ParserException == null) { return; } ParserExceptionEventArgs e = new ParserExceptionEventArgs(exception); foreach (EventHandler<ParserExceptionEventArgs> del in ParserException.GetInvocationList()) { del.BeginInvoke(this, e, AsyncCallBackRaiseParserExceptionEvent, del); } }