ServiceStack.HttpHandlerFactory.ShouldAllow C# (CSharp) Метод

ShouldAllow() публичный статический Метод

public static ShouldAllow ( string filePath ) : bool
filePath string
Результат bool
        public static bool ShouldAllow(string filePath)
        {
            var parts = filePath.SplitOnLast('.');
            if (parts.Length == 1 || string.IsNullOrEmpty(parts[1]))
                return false;

            var fileExt = parts[1];
            if (HostContext.Config.AllowFileExtensions.Contains(fileExt))
                return true;

            foreach (var pathGlob in HostContext.Config.AllowFilePaths)
            {
                if (filePath.GlobPath(pathGlob))
                    return true;
            }
            return false;
        }