Exemplo n.º 1
0
        private static IEnumerable <string> GetAllowedExtensions(ExtensionType type)
        {
            var extensions = new List <string>();

            if (type.HasFlag(ExtensionType.Any | ExtensionType.Empty))
            {
                return(null);
            }

            foreach (ExtensionType activeType in type.GetFlags())
            {
                extensions.Add('.' + activeType.ToString().ToLower());
            }

            return(extensions);
        }