public static bool IsFileExtensionAllowed(string sAllowedExt, string sExt) { if (sExt != null && sExt.StartsWith(".")) { sExt = sExt.Substring(1, sExt.Length - 1); } sAllowedExt = sAllowedExt.Replace("|", ","); var aExt = sAllowedExt.Split(','); return(aExt.Any(t => CommHelper.EqualsIgnoreCase(sExt, t))); }
public static bool IsZip(string typeStr) { return(CommHelper.EqualsIgnoreCase(".zip", typeStr)); }
public static bool IsExtension(string ext, params string[] extensions) { return(extensions.Any(extension => CommHelper.EqualsIgnoreCase(ext, extension))); }