public void WellKnownPorts_CanBeInstantiated() { var ftp = new FtpPort(); Assert.That(ftp.IsWellKnown, Is.True); var https = new HttpsPort(); Assert.That(https.IsWellKnown, Is.True); }
/// <summary> /// 获取完整的FTP主机格式 /// </summary> /// <returns></returns> public static string GetFtpRoot() { string port = string.Empty; string split = string.Empty; if (!FtpPort.Equals(21)) { split = ":"; port = FtpPort.ToString(); } return(string.Format("ftp://{0}{1}{2}", FtpHost, split, port)); }
public virtual string GetFtpFileTemplatePath(string strFileName) { string path = "ftp://" + FtpHost + ":" + FtpPort.ToString() + "/" + strFileName.TrimStart('/'); return(path); }
public virtual string GetFtpFilepath(string strFileName) { return("ftp://" + FtpHost + ":" + FtpPort.ToString() + "/" + GetFtpBasePath(strFileName)); }