コード例 #1
0
            public void SendRequest(Message message, TimeSpan timeout)
            {
                TimeoutHelper timeoutHelper = new TimeoutHelper(timeout);

                try
                {
                    this.connection = connectionPoolHelper.EstablishConnection(timeoutHelper.RemainingTime());

                    ChannelBindingUtility.TryAddToMessage(this.channel.channelBindingToken, message, false);

                    bool success = false;
                    try
                    {
                        StreamingConnectionHelper.WriteMessage(message, this.connection, true, channel.settings, ref timeoutHelper);
                        success = true;
                    }
                    finally
                    {
                        if (!success)
                        {
                            connectionPoolHelper.Abort();
                        }
                    }
                }
                catch (TimeoutException exception)
                {
                    throw DiagnosticUtility.ExceptionUtility.ThrowHelperError(
                              new TimeoutException(SR.GetString(SR.TimeoutOnRequest, timeout), exception));
                }
            }
コード例 #2
0
 private void Cleanup()
 {
     _connectionPoolHelper.Abort();
 }
コード例 #3
0
 void Cleanup()
 {
     connectionPoolHelper.Abort();
 }