Exemplo n.º 1
0
            private bool HandleEstablishConnection(IAsyncResult result)
            {
                this.connection = this.connectionPoolHelper.EndEstablishConnection(result);
                ChannelBindingUtility.TryAddToMessage(this.channel.channelBindingToken, this.message, false);
                IAsyncResult result2 = StreamingConnectionHelper.BeginWriteMessage(this.message, this.connection, true, this.channel.settings, ref this.timeoutHelper, onWriteMessage, this);

                if (!result2.CompletedSynchronously)
                {
                    return(false);
                }
                return(this.HandleWriteMessage(result2));
            }
Exemplo n.º 2
0
 protected override IAsyncResult OnBeginReply(Message message, TimeSpan timeout, AsyncCallback callback, object state)
 {
     this.timeoutHelper = new TimeoutHelper(timeout);
     return(StreamingConnectionHelper.BeginWriteMessage(message, this.connection, false, this.settings, ref this.timeoutHelper, callback, state));
 }