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