public HistoricalOutput(string Name, string Type, string Directory, FTP Ftp) { this.Name = Name; this.FTPType = (FTPType)Enum.Parse(typeof(FTPType), Type, true); this.Directory = Directory; this.Ftp = Ftp; }
public byte[] DownloadFile(FTPType fTPType, string ftpUrl, string savePath, string userName = "", string password = "") { switch (fTPType) { case FTPType.USING_WEBCLIENT: return(downloadWithWEB(ftpUrl, savePath, userName, password)); default: case FTPType.USING_FTP: return(downloadWithFTP(ftpUrl, savePath, userName, password)); } }
public static IFTPClient CreateInstance(string ip, int port, string path, string username, string password, FTPType type) { IFTPClient client; switch (type) { case FTPType.SFTP: client = new SFTPClient(ip, port, path, username, password); break; default: client = new FTPClient(ip, port, path, username, password); break; } return(client); }