예제 #1
0
        public Task InvokeAsync(HttpContext context, IFastApi response, IFastRepository IFast)
        {
            var key = context.Request.Path.Value.ToStr().Substring(1, context.Request.Path.Value.ToStr().Length - 1).ToLower();

            if (key == "help" || key == "xml" || key == "del")
            {
                return(next(context));
            }
            else
            {
                return(response.ContentAsync(context, IFast));
            }
        }
예제 #2
0
        public Task InvokeAsync(HttpContext context, IFastApi response, IFastRepository IFast)
        {
            var name = context.Request.Path.Value.ToStr().Substring(1, context.Request.Path.Value.ToStr().Length - 1).ToLower();

            if (option != null && option.FilterUrl.Exists(a => a.ToLower() == name) || name == "")
            {
                return(next(context));
            }

            if (option != null && !option.IsAlone && (!IFast.IsExists(name) || IFast.MapDb(name).ToStr() == ""))
            {
                return(next(context));
            }

            if (option != null)
            {
                return(response.ContentAsync(context, IFast, option.IsResource, option.dbFile));
            }
            else
            {
                return(response.ContentAsync(context, IFast));
            }
        }