internal Dev2ActivityIOPath(enActivityIOPathType type, string path, string user, string pass, bool isNotCertVerifiable) { PathType = type; Path = path; Username = user; Password = pass; IsNotCertVerifiable = isNotCertVerifiable; }
internal Dev2ActivityIOPath(enActivityIOPathType type, string path, string user, string pass, bool isNotCertVerifiable,string privateKeyFile) { PathType = type; Path = path; Username = user; Password = pass; IsNotCertVerifiable = isNotCertVerifiable; PrivateKeyFile = privateKeyFile; }
/// <summary> /// Return an IActivityIOPath based upont the path string /// </summary> /// <param name="path"></param> /// <returns></returns> public static IActivityIOPath CreatePathFromString(string path, string user, string pass, bool IsNotCertVerifiable) { // Fetch path type enActivityIOPathType type = Dev2ActivityIOPathUtils.ExtractPathType(path); if (type == enActivityIOPathType.Invalid) { // Default to file system type = enActivityIOPathType.FileSystem; } return(new Dev2ActivityIOPath(type, path, user, pass, IsNotCertVerifiable)); }
/// <summary> /// Return an IActivityIOPath based upont the path string /// </summary> /// <param name="path">The path.</param> /// <param name="user">The user.</param> /// <param name="pass">The pass.</param> /// <param name="isNotCertVerifiable">if set to <c>true</c> [is not cert verifiable].</param> /// <param name="privateKeyFile">If private key file is required. This is the path</param> /// <returns></returns> public static IActivityIOPath CreatePathFromString(string path, string user, string pass, bool isNotCertVerifiable, string privateKeyFile = "") { VerifyArgument.IsNotNull("path", path); enActivityIOPathType type = Dev2ActivityIOPathUtils.ExtractPathType(path); if (type == enActivityIOPathType.Invalid) { // Default to file system type = enActivityIOPathType.FileSystem; if (!Path.IsPathRooted(path)) { throw new IOException(ErrorResource.InvalidPath); } } return(new Dev2ActivityIOPath(type, path, user, pass, isNotCertVerifiable, privateKeyFile)); }
/// <summary> /// Return an IActivityIOPath based upont the path string /// </summary> /// <param name="path">The path.</param> /// <param name="user">The user.</param> /// <param name="pass">The pass.</param> /// <param name="isNotCertVerifiable">if set to <c>true</c> [is not cert verifiable].</param> /// <param name="privateKeyFile">If private key file is required. This is the path</param> /// <returns></returns> public static IActivityIOPath CreatePathFromString(string path, string user, string pass, bool isNotCertVerifiable, string privateKeyFile = "") { VerifyArgument.IsNotNull("path", path); // Fetch path type enActivityIOPathType type = Dev2ActivityIOPathUtils.ExtractPathType(path); if (type == enActivityIOPathType.Invalid) { // Default to file system type = enActivityIOPathType.FileSystem; if (!Path.IsPathRooted(path)) { throw new IOException("Invalid Path. Please insure that the path provided is an absolute path, if you intended to access the local file system."); } } return(new Dev2ActivityIOPath(type, path, user, pass, isNotCertVerifiable, privateKeyFile)); }
public static enActivityIOPathType ExtractPathType(string path) { enActivityIOPathType result = enActivityIOPathType.Invalid; Array vals = Enum.GetValues(typeof(enActivityIOPathType)); int pos = 0; while (pos < vals.Length && result == enActivityIOPathType.Invalid) { string toCheck = vals.GetValue(pos) + ":"; string checkPath = path.ToUpper(); if (checkPath.StartsWith(toCheck)) { result = (enActivityIOPathType)vals.GetValue(pos); } pos++; } return(result); }
public bool HandlesType(enActivityIOPathType type) { var result = type == enActivityIOPathType.FTPS || type == enActivityIOPathType.SFTP || type == enActivityIOPathType.FTP || type == enActivityIOPathType.FTPES; return(result); }
public bool HandlesType(enActivityIOPathType type) => type == enActivityIOPathType.FileSystem;
public bool HandlesType(enActivityIOPathType type) { return(type == enActivityIOPathType.FileSystem); }
public bool HandlesType(enActivityIOPathType type) { return type == enActivityIOPathType.FileSystem; }
public bool HandlesType(enActivityIOPathType type) { var result = type == enActivityIOPathType.FTPS || type == enActivityIOPathType.SFTP || type == enActivityIOPathType.FTP || type == enActivityIOPathType.FTPES; return result; }