/// <summary> /// Constructor for the current class. /// </summary> /// <param name="ftpAdapter">FTP adapter contains the complete /// connection information.</param> /// <param name="callbackHandler">Processing callback delegate.</param> public FTPClientConnection(FTPConnectionAdapter ftpAdapter, FTPWebSocketCallbackHandler callbackHandler) { this.ftpAdapter = ftpAdapter; ftpClient = new FTPSocket(callbackHandler); ftpAsycClient = new AsynchronousFTPSocket(callbackHandler); }
// Dispose(bool disposing) executes in two distinct scenarios. // If disposing equals true, the method has been called directly // or indirectly by a user's code. Managed and unmanaged resources // can be disposed. // If disposing equals false, the method has been called by the // runtime from inside the finalizer and you should not reference // other objects. Only unmanaged resources can be disposed. private void Dispose(bool disposing) { // Check to see if Dispose has already been called. if (!this.disposed) { // If disposing equals true, dispose all managed // and unmanaged resources. if (disposing) { // Dispose managed resources. this.ftpAdapter = null; } // Call the appropriate methods to clean up // unmanaged resources here. // Note disposing has been done. disposed = true; } }
/// <summary> /// Dispose(bool disposing) executes in two distinct scenarios. /// If disposing equals true, the method has been called directly /// or indirectly by a user's code. Managed and unmanaged resources /// can be disposed. /// If disposing equals false, the method has been called by the /// runtime from inside the finalizer and you should not reference /// other objects. Only unmanaged resources can be disposed. /// </summary> protected virtual void Dispose(bool disposing) { // Check to see if Dispose has already been called. if (!this.disposed) { // If disposing equals true, dispose all managed // and unmanaged resources. if (disposing) { // Dispose managed resources. if (ftpClient != null) { ftpClient.Dispose(); } if (ftpAsycClient != null) { ftpAsycClient.Dispose(); } if (ftpAdapter != null) { ftpAdapter.Dispose(); } } // Call the appropriate methods to clean up // unmanaged resources here. ftpAdapter = null; ftpClient = null; ftpAsycClient = null; // Note disposing has been done. disposed = true; } }
/// <summary> /// Constructor for the class. /// </summary> /// <param name="ftpAdapter">The current ftp connection adapter.</param> /// <param name="ftpTransmit">The current ftp transmit adapter.</param> public FTPIntegrationAdapter(FTPConnectionAdapter ftpAdapter, FTPTransmitAdapter ftpTransmit) { this.ftpAdapter = ftpAdapter; this.ftpTransmit = ftpTransmit; }
/// <summary> /// Constructor for the current class. /// </summary> /// <param name="ftpAdapter">FTP adapter contains the complete /// connection information.</param> public FTPClientConnection(FTPConnectionAdapter ftpAdapter) { this.ftpAdapter = ftpAdapter; ftpClient = new FTPSocket(); ftpAsycClient = new AsynchronousFTPSocket(); }