Exemplo n.º 1
0
        public IEnumerable <Filter> GetFilters(ControllerContext controllerContext, ActionDescriptor actionDescriptor, ControllerDescriptor controllerDescriptor)
        {
            var globalActionFilterSelector     = new GlobalActionFilterSelector(controllerContext, actionDescriptor, controllerDescriptor);
            var controllerFilterSelector       = new ControllerFilterSelector(controllerContext, controllerDescriptor, actionDescriptor);
            var controllerActionFilterSelector = new ControllerActionFilterSelector(controllerContext, actionDescriptor, controllerDescriptor);

            var actionFilterRegistryItems = actionFilterRegistry.FindForSelectors(globalActionFilterSelector, controllerFilterSelector, controllerActionFilterSelector);

            return(GetFilters(actionFilterRegistryItems));
        }
Exemplo n.º 2
0
        public IEnumerable<Filter> GetFilters(ControllerContext controllerContext, ActionDescriptor actionDescriptor, ControllerDescriptor controllerDescriptor)
        {
            var globalActionFilterSelector = new GlobalActionFilterSelector(controllerContext, actionDescriptor, controllerDescriptor);
            var controllerFilterSelector = new ControllerFilterSelector(controllerContext, controllerDescriptor, actionDescriptor);
            var controllerActionFilterSelector = new ControllerActionFilterSelector(controllerContext, actionDescriptor, controllerDescriptor);

            var actionFilterRegistryItems = actionFilterRegistry.FindForSelectors(globalActionFilterSelector, controllerFilterSelector, controllerActionFilterSelector);

            return GetFilters(actionFilterRegistryItems);
        }