public void EndSendMessage(IAsyncResult ar) { try { SendMessageFailureAsyncResult result = ar as SendMessageFailureAsyncResult; if (result != null) { result.End(); } else { base.GetChannel(null).EndSend(ar); } } catch (TimeoutException exception) { Microsoft.Transactions.Bridge.DiagnosticUtility.ExceptionUtility.TraceHandledException(exception, TraceEventType.Warning); throw Microsoft.Transactions.Bridge.DiagnosticUtility.ExceptionUtility.ThrowHelperError(new WsatSendFailureException(exception)); } catch (QuotaExceededException exception2) { Microsoft.Transactions.Bridge.DiagnosticUtility.ExceptionUtility.TraceHandledException(exception2, TraceEventType.Warning); throw Microsoft.Transactions.Bridge.DiagnosticUtility.ExceptionUtility.ThrowHelperError(new WsatSendFailureException(exception2)); } catch (CommunicationException exception3) { Microsoft.Transactions.Bridge.DiagnosticUtility.ExceptionUtility.TraceHandledException(exception3, TraceEventType.Warning); throw Microsoft.Transactions.Bridge.DiagnosticUtility.ExceptionUtility.ThrowHelperError(new WsatSendFailureException(exception3)); } catch (Exception exception4) { DebugTrace.Trace(TraceLevel.Error, "Unhandled exception {0} in DatagramProxy.EndSendMessage: {1}", exception4.GetType().Name, exception4); Microsoft.Transactions.Bridge.DiagnosticUtility.InvokeFinalHandler(exception4); } finally { base.Release(); } }
protected Message EndSendRequest(IAsyncResult ar, string replyAction) { Message message; try { SendMessageFailureAsyncResult result = ar as SendMessageFailureAsyncResult; if (result != null) { result.End(); message = null; } else { message = base.GetChannel(null).EndRequest(ar); } } catch (TimeoutException exception) { Microsoft.Transactions.Bridge.DiagnosticUtility.ExceptionUtility.TraceHandledException(exception, TraceEventType.Warning); base.OnChannelFailure(); throw Microsoft.Transactions.Bridge.DiagnosticUtility.ExceptionUtility.ThrowHelperError(new WsatSendFailureException(exception)); } catch (QuotaExceededException exception2) { Microsoft.Transactions.Bridge.DiagnosticUtility.ExceptionUtility.TraceHandledException(exception2, TraceEventType.Warning); base.OnChannelFailure(); throw Microsoft.Transactions.Bridge.DiagnosticUtility.ExceptionUtility.ThrowHelperError(new WsatSendFailureException(exception2)); } catch (FaultException exception3) { Microsoft.Transactions.Bridge.DiagnosticUtility.ExceptionUtility.TraceHandledException(exception3, TraceEventType.Warning); base.OnChannelFailure(); throw Microsoft.Transactions.Bridge.DiagnosticUtility.ExceptionUtility.ThrowHelperError(new WsatFaultException(exception3.CreateMessageFault(), exception3.Action)); } catch (CommunicationException exception4) { Microsoft.Transactions.Bridge.DiagnosticUtility.ExceptionUtility.TraceHandledException(exception4, TraceEventType.Warning); base.OnChannelFailure(); throw Microsoft.Transactions.Bridge.DiagnosticUtility.ExceptionUtility.ThrowHelperError(new WsatSendFailureException(exception4)); } catch (Exception exception5) { DebugTrace.Trace(TraceLevel.Error, "Unhandled exception {0} in RequestReplyProxy.ReadReply: {1}", exception5.GetType().Name, exception5); base.OnChannelFailure(); throw Microsoft.Transactions.Bridge.DiagnosticUtility.InvokeFinalHandler(exception5); } finally { base.Release(); } try { this.ValidateReply(message, replyAction); } catch { message.Close(); throw; } return(message); }