Implemented interface member:
property
Filters
Microsoft.AspNetCore.Mvc.ApplicationModels.IFilterModel.Filters
2 writes to Filters
Microsoft.AspNetCore.Mvc.Core (2)
ApplicationModels\ControllerModel.cs (2)
37
Filters
= new List<IFilterMetadata>();
59
Filters
= new List<IFilterMetadata>(other.Filters);
40 references to Filters
Microsoft.AspNetCore.Mvc.Core (7)
ApplicationModels\AuthorizationApplicationModelProvider.cs (2)
47
controllerModel.
Filters
.Add(GetFilter(_policyProvider, controllerModelAuthData));
51
controllerModel.
Filters
.Add(new AllowAnonymousFilter());
ApplicationModels\ControllerActionDescriptorBuilder.cs (1)
46
AddActionFilters(actionDescriptor, action.Filters, controller.
Filters
, application.Filters);
ApplicationModels\ControllerModel.cs (1)
59
Filters = new List<IFilterMetadata>(other.
Filters
);
ApplicationModels\DefaultApplicationModelProvider.cs (3)
168
AddRange(controllerModel.
Filters
, attributes.OfType<IFilterMetadata>());
194
controllerModel.
Filters
.Add(new ControllerActionFilter());
199
controllerModel.
Filters
.Add(new ControllerResultFilter());
Microsoft.AspNetCore.Mvc.Core.Test (14)
ApplicationModels\AuthorizationApplicationModelProviderTest.cs (6)
33
Assert.Empty(controller.
Filters
);
51
Assert.Empty(controller.
Filters
);
69
Assert.Single(controller.
Filters
, f => f is AuthorizeFilter);
116
Assert.Single(controller.
Filters
, f => f is AllowAnonymousFilter);
188
Assert.Empty(controller.
Filters
);
200
Assert.Empty(controller.
Filters
);
ApplicationModels\ControllerModelTest.cs (3)
51
Assert.NotSame(controller.
Filters
, controller2.
Filters
);
77
controller.
Filters
.Add(new MyFilterAttribute());
ApplicationModels\DefaultApplicationModelProviderTest.cs (5)
381
var filter = Assert.Single(model.
Filters
);
398
var filter = Assert.Single(model.
Filters
);
413
Assert.Single(model.
Filters
, f => f is ControllerActionFilter);
414
Assert.Single(model.
Filters
, f => f is ControllerResultFilter);
428
Assert.Empty(model.
Filters
);
Microsoft.AspNetCore.Mvc.Cors (3)
CorsApplicationModelProvider.cs (3)
50
controllerModel.
Filters
.Add(new CorsAuthorizationFilterFactory(enableCors.PolicyName));
56
controllerModel.
Filters
.Add(new DisableCorsAuthorizationFilter());
59
var corsOnController = enableCors != null || disableCors != null || controllerModel.
Filters
.OfType<ICorsAuthorizationFilter>().Any();
Microsoft.AspNetCore.Mvc.Cors.Test (2)
CorsApplicationModelProviderTest.cs (2)
34
Assert.Single(model.
Filters
, f => f is CorsAuthorizationFilterFactory);
53
Assert.Single(model.
Filters
, f => f is DisableCorsAuthorizationFilter);
Microsoft.AspNetCore.Mvc.ViewFeatures (4)
Filters\AntiforgeryApplicationModelProvider.cs (2)
31
if (HasValidAntiforgeryMetadata(controllerModel.Attributes, controllerModel.
Filters
))
33
controllerModel.
Filters
.Add(AntiforgeryMiddlewareAuthorizationFilter);
Filters\TempDataApplicationModelProvider.cs (1)
43
controllerModel.
Filters
.Add(filter);
Filters\ViewDataAttributeApplicationModelProvider.cs (1)
35
controllerModel.
Filters
.Add(filter);
Microsoft.AspNetCore.Mvc.ViewFeatures.Test (10)
Filters\AntiforgeryApplicationModelProviderTest.cs (4)
63
var filter = Assert.Single(controller.
Filters
);
68
Assert.Empty(controller.
Filters
);
90
var filter = Assert.Single(controller.
Filters
);
95
Assert.Empty(controller.
Filters
);
Filters\TempDataApplicationModelProviderTest.cs (3)
28
Assert.Empty(controller.
Filters
);
76
var filter = Assert.IsType<ControllerSaveTempDataPropertyFilterFactory>(Assert.Single(controller.
Filters
));
97
var filter = Assert.IsType<ControllerSaveTempDataPropertyFilterFactory>(Assert.Single(controller.
Filters
));
Filters\ViewDataAttributeApplicationModelProviderTest.cs (3)
26
Assert.Empty(controller.
Filters
);
42
Assert.IsType<ControllerViewDataAttributeFilterFactory>(Assert.Single(controller.
Filters
));
56
var filter = Assert.IsType<ControllerViewDataAttributeFilterFactory>(Assert.Single(controller.
Filters
));