private void EndpointNotFoundCallback(IAsyncResult result) { if (!result.CompletedSynchronously) { ChannelAndMessageAsyncState asyncState = (ChannelAndMessageAsyncState)result.AsyncState; bool flag = true; try { DuplexSessionDemuxFailureAsyncResult.End(result); flag = false; } catch (TimeoutException exception) { if (DiagnosticUtility.ShouldTraceInformation) { DiagnosticUtility.ExceptionUtility.TraceHandledException(exception, TraceEventType.Information); } } catch (CommunicationException exception2) { if (DiagnosticUtility.ShouldTraceInformation) { DiagnosticUtility.ExceptionUtility.TraceHandledException(exception2, TraceEventType.Information); } } catch (ObjectDisposedException exception3) { if (DiagnosticUtility.ShouldTraceInformation) { DiagnosticUtility.ExceptionUtility.TraceHandledException(exception3, TraceEventType.Information); } } catch (Exception exception4) { if (Fx.IsFatal(exception4)) { throw; } base.HandleUnknownException(exception4); } finally { if (flag) { this.AbortItem(asyncState.message); asyncState.channel.Abort(); } } } }
protected override void EndpointNotFound(IDuplexSessionChannel channel, Message message) { bool flag = true; try { if (base.DemuxFailureHandler != null) { try { DuplexSessionDemuxFailureAsyncResult result = new DuplexSessionDemuxFailureAsyncResult(base.DemuxFailureHandler, channel, message, Fx.ThunkCallback(new AsyncCallback(this.EndpointNotFoundCallback)), new ChannelAndMessageAsyncState(channel, message)); result.Start(); if (!result.CompletedSynchronously) { flag = false; } else { DuplexSessionDemuxFailureAsyncResult.End(result); flag = false; } } catch (CommunicationException exception) { if (DiagnosticUtility.ShouldTraceInformation) { DiagnosticUtility.ExceptionUtility.TraceHandledException(exception, TraceEventType.Information); } } catch (TimeoutException exception2) { if (DiagnosticUtility.ShouldTraceInformation) { DiagnosticUtility.ExceptionUtility.TraceHandledException(exception2, TraceEventType.Information); } } catch (ObjectDisposedException exception3) { if (DiagnosticUtility.ShouldTraceInformation) { DiagnosticUtility.ExceptionUtility.TraceHandledException(exception3, TraceEventType.Information); } } catch (Exception exception4) { if (Fx.IsFatal(exception4)) { throw; } base.HandleUnknownException(exception4); } } } finally { if (flag) { this.AbortItem(message); channel.Abort(); } } }