Example #1
0
 /// <summary>
 /// Initializes a new instance of the <see cref="HangingRequestDisconnectEventArgs"/> class.
 /// </summary>
 /// <param name="reason">The reason.</param>
 /// <param name="exception">The exception.</param>
 internal HangingRequestDisconnectEventArgs(
     HangingRequestDisconnectReason reason,
     Exception exception)
 {
     this.Reason    = reason;
     this.Exception = exception;
 }
 /// <summary>
 /// Initializes a new instance of the <see cref="HangingRequestDisconnectEventArgs"/> class.
 /// </summary>
 /// <param name="reason">The reason.</param>
 /// <param name="exception">The exception.</param>
 internal HangingRequestDisconnectEventArgs(
     HangingRequestDisconnectReason reason,
     Exception exception)
 {
     this.Reason = reason;
     this.Exception = exception;
 }
Example #3
0
 /// <summary>
 /// Disconnects the request with the specified reason and exception.
 /// </summary>
 /// <param name="reason">The reason.</param>
 /// <param name="exception">The exception.</param>
 internal void Disconnect(HangingRequestDisconnectReason reason, Exception exception)
 {
     if (this.IsConnected)
     {
         this.response.Close();
         this.InternalOnDisconnect(reason, exception);
     }
 }
Example #4
0
        /// <summary>
        /// Perform any bookkeeping needed when we disconnect (cleanly or forcefully)
        /// </summary>
        /// <param name="reason"></param>
        /// <param name="exception"></param>
        private void InternalOnDisconnect(HangingRequestDisconnectReason reason, Exception exception)
        {
            if (this.IsConnected)
            {
                this.IsConnected = false;

                this.OnDisconnect(
                    this,
                    new HangingRequestDisconnectEventArgs(reason, exception));
            }
        }
        /// <summary>
        /// Perform any bookkeeping needed when we disconnect (cleanly or forcefully)
        /// </summary>
        /// <param name="reason"></param>
        /// <param name="exception"></param>
        private void InternalOnDisconnect(HangingRequestDisconnectReason reason, Exception exception)
        {
            if (this.IsConnected)
            {
                this.IsConnected = false;

                this.OnDisconnect(
                    this,
                    new HangingRequestDisconnectEventArgs(reason, exception));
            }
        }
 /// <summary>
 /// Disconnects the request with the specified reason and exception.
 /// </summary>
 /// <param name="reason">The reason.</param>
 /// <param name="exception">The exception.</param>
 internal void Disconnect(HangingRequestDisconnectReason reason, Exception exception)
 {
     if (this.IsConnected)
     {
         this.response.Close();
         this.InternalOnDisconnect(reason, exception);
     }
 }