Implemented interface member:
property
Filters
Microsoft.AspNetCore.Mvc.ApplicationModels.IFilterModel.Filters
2 writes to Filters
Microsoft.AspNetCore.Mvc.Core (2)
ApplicationModels\ActionModel.cs (2)
36Filters = new List<IFilterMetadata>(); 60Filters = new List<IFilterMetadata>(other.Filters);
38 references to Filters
Microsoft.AspNetCore.Mvc.Core (9)
ApplicationModels\ActionModel.cs (1)
60Filters = new List<IFilterMetadata>(other.Filters);
ApplicationModels\AuthorizationApplicationModelProvider.cs (2)
59actionModel.Filters.Add(GetFilter(_policyProvider, actionModelAuthData)); 64actionModel.Filters.Add(new AllowAnonymousFilter());
ApplicationModels\ClientErrorResultFilterConvention.cs (1)
27action.Filters.Add(_filterFactory);
ApplicationModels\ConsumesConstraintForFormFileParameterConvention.cs (2)
43if (action.Filters.OfType<IConsumesActionConstraint>().Any()) 54action.Filters.Add(new ConsumesAttribute("multipart/form-data"));
ApplicationModels\ControllerActionDescriptorBuilder.cs (1)
46AddActionFilters(actionDescriptor, action.Filters, controller.Filters, application.Filters);
ApplicationModels\DefaultApplicationModelProvider.cs (1)
271AddRange(actionModel.Filters, attributes.OfType<IFilterMetadata>());
ApplicationModels\InvalidModelStateFilterConvention.cs (1)
27action.Filters.Add(_filterFactory);
Microsoft.AspNetCore.Mvc.Core.Test (15)
ApplicationModels\ActionModelTest.cs (1)
76action.Filters.Add(new MyFilterAttribute());
ApplicationModels\ApiBehaviorApplicationModelProviderTest.cs (4)
76Assert.NotEmpty(actionModel.Filters.OfType<ModelStateInvalidFilterFactory>()); 77Assert.NotEmpty(actionModel.Filters.OfType<ClientErrorResultFilterFactory>()); 119Assert.NotEmpty(actionModel.Filters.OfType<ModelStateInvalidFilterFactory>()); 120Assert.NotEmpty(actionModel.Filters.OfType<ClientErrorResultFilterFactory>());
ApplicationModels\ApiConventionApplicationModelConventionTest.cs (1)
50actionModel.Filters.Add(new AuthorizeFilter());
ApplicationModels\AuthorizationApplicationModelProviderTest.cs (5)
95var authorizeFilters = action.Filters.OfType<AuthorizeFilter>(); 118Assert.Single(action.Filters, f => f is AllowAnonymousFilter); 141var authorizationFilter = Assert.IsType<AuthorizeFilter>(Assert.Single(action.Filters)); 168var actionFilter = Assert.IsType<AuthorizeFilter>(Assert.Single(action.Filters)); 190Assert.Empty(action.Filters);
ApplicationModels\ClientErrorResultFilterConventionTest.cs (1)
21Assert.Single(action.Filters.OfType<ClientErrorResultFilterFactory>());
ApplicationModels\ConsumesConstraintForFormFileParameterConventionTest.cs (2)
25var attribute = Assert.Single(action.Filters); 46var attribute = Assert.Single(action.Filters);
ApplicationModels\InvalidModelStateFilterConventionTest.cs (1)
21Assert.Single(action.Filters.OfType<ModelStateInvalidFilterFactory>());
Microsoft.AspNetCore.Mvc.Cors (3)
CorsApplicationModelProvider.cs (3)
66actionModel.Filters.Add(new CorsAuthorizationFilterFactory(enableCors.PolicyName)); 72actionModel.Filters.Add(new DisableCorsAuthorizationFilter()); 75var corsOnAction = enableCors != null || disableCors != null || actionModel.Filters.OfType<ICorsAuthorizationFilter>().Any();
Microsoft.AspNetCore.Mvc.Cors.Test (2)
CorsApplicationModelProviderTest.cs (2)
91Assert.Single(action.Filters, f => f is CorsAuthorizationFilterFactory); 110Assert.Contains(action.Filters, f => f is DisableCorsAuthorizationFilter);
Microsoft.AspNetCore.Mvc.IntegrationTests (2)
AuthorizeFilterIntegrationTest.cs (2)
101var authorizationFilterContext = new AuthorizationFilterContext(actionContext, action.Filters); 137var authorizationFilterContext = new AuthorizationFilterContext(actionContext, action.Filters);
Microsoft.AspNetCore.Mvc.ViewFeatures (2)
Filters\AntiforgeryApplicationModelProvider.cs (2)
39if (HasValidAntiforgeryMetadata(actionModel.Attributes, actionModel.Filters) && !controllerFilterAdded) 41actionModel.Filters.Add(AntiforgeryMiddlewareAuthorizationFilter);
Microsoft.AspNetCore.Mvc.ViewFeatures.Test (5)
Filters\AntiforgeryApplicationModelProviderTest.cs (5)
31Assert.IsType<AntiforgeryMiddlewareAuthorizationFilter>(Assert.Single(model.Filters)); 36Assert.IsType<ValidateAntiForgeryTokenAttribute>(Assert.Single(model.Filters)); 41Assert.Empty(model.Filters); 116Assert.Empty(model.Filters); 121Assert.Empty(model.Filters);