Esempio n. 1
0
        public ResourceFilter When(Func <HttpContext, bool> filter)
        {
            var resourceFilter = new ResourceFilter
            {
                Filter = filter
            };

            ResourceFilters.Add(resourceFilter);

            return(resourceFilter);
        }
Esempio n. 2
0
 public static void RegisterHeadScript(this ResourceFilter filter, string resource) =>
 filter.Execute(resourceManager => resourceManager.RegisterResource("script", resource).AtHead());
Esempio n. 3
0
 public static void RegisterStylesheet(this ResourceFilter filter, string resource) =>
 filter.Execute(resourceManager => resourceManager.RegisterResource("stylesheet", resource));