Esempio n. 1
0
        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)));
        }
Esempio n. 2
0
 public static bool IsZip(string typeStr)
 {
     return(CommHelper.EqualsIgnoreCase(".zip", typeStr));
 }
Esempio n. 3
0
 public static bool IsExtension(string ext, params string[] extensions)
 {
     return(extensions.Any(extension => CommHelper.EqualsIgnoreCase(ext, extension)));
 }