/// <summary> /// Releases the unmanaged resources used by the <see cref="FtpClient"/> object and optionally releases the managed resources. /// </summary> /// <param name="disposing">true to release both managed and unmanaged resources; false to release only unmanaged resources.</param> protected override void Dispose(bool disposing) { if (!m_disposed) { try { if (disposing) { if (m_currentState != null) m_currentState.Dispose(); m_currentState = null; } } finally { m_disposed = true; // Prevent duplicate dispose. base.Dispose(disposing); // Call base class Dispose(). } } }
/// <summary> /// Constructs a new FTP session using the specified settings. /// </summary> /// <param name="caseInsensitive">Set to true to not be case sensitive with FTP file and directory names.</param> public FtpClient(bool caseInsensitive) : base() { m_caseInsensitive = caseInsensitive; m_waitLockTimeOut = 10; m_currentState = new FtpSessionDisconnected(this, m_caseInsensitive); }