| 123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566 | using System;using Renci.SshNet.Messages.Transport;namespace Renci.SshNet.Common{    /// <summary>    /// The exception that is thrown when connection was terminated.    /// </summary>    public partial class SshConnectionException : SshException    {        /// <summary>        /// Gets the disconnect reason if provided by the server or client. Otherwise None.        /// </summary>        public DisconnectReason DisconnectReason { get; private set; }        /// <summary>        /// Initializes a new instance of the <see cref="SshConnectionException"/> class.        /// </summary>        public SshConnectionException()        {        }        /// <summary>        /// Initializes a new instance of the <see cref="SshConnectionException"/> class.        /// </summary>        /// <param name="message">The message.</param>        public SshConnectionException(string message)            : base(message)        {            DisconnectReason = DisconnectReason.None;        }        /// <summary>        /// Initializes a new instance of the <see cref="SshConnectionException"/> class.        /// </summary>        /// <param name="message">The message.</param>        /// <param name="disconnectReasonCode">The disconnect reason code.</param>        public SshConnectionException(string message, DisconnectReason disconnectReasonCode)            : base(message)        {            DisconnectReason = disconnectReasonCode;        }        /// <summary>        /// Initializes a new instance of the <see cref="SshConnectionException"/> class.        /// </summary>        /// <param name="message">The message.</param>        /// <param name="disconnectReasonCode">The disconnect reason code.</param>        /// <param name="inner">The inner.</param>        public SshConnectionException(string message, DisconnectReason disconnectReasonCode, Exception inner)            : base(message, inner)        {            DisconnectReason = disconnectReasonCode;        }        /// <summary>        /// Initializes a new instance of the <see cref="SshConnectionException"/> class.        /// </summary>        /// <param name="message">The message.</param>        /// <param name="innerException">The inner exception.</param>        public SshConnectionException(string message, Exception innerException) :            base(message, innerException)        {        }    }}
 |