90 references to FilterDescriptor
Microsoft.AspNetCore.Mvc.ApiExplorer.Test (44)
ApiResponseTypeProviderTest.cs (13)
81
new
FilterDescriptor
(new ProducesResponseTypeAttribute(400), FilterScope.Global),
82
new
FilterDescriptor
(new ProducesResponseTypeAttribute(typeof(object), 201), FilterScope.Controller),
83
new
FilterDescriptor
(new ProducesResponseTypeAttribute(typeof(ProblemDetails), 400), FilterScope.Controller),
84
new
FilterDescriptor
(new ProducesResponseTypeAttribute(typeof(BaseModel), 201), FilterScope.Action),
85
new
FilterDescriptor
(new ProducesResponseTypeAttribute(404), FilterScope.Action),
570
actionDescriptor.FilterDescriptors.Add(new
FilterDescriptor
(new ProducesAttribute("application/json"), FilterScope.Controller));
620
actionDescriptor.FilterDescriptors.Add(new
FilterDescriptor
(new ProducesAttribute("application/json") { Type = typeof(string) }, FilterScope.Controller));
683
actionDescriptor.FilterDescriptors.Add(new
FilterDescriptor
(new ProducesAttribute("application/pdf"), FilterScope.Action));
713
actionDescriptor.FilterDescriptors.Add(new
FilterDescriptor
(new ProducesAttribute("text/xml") { Type = typeof(BaseModel) }, FilterScope.Action));
714
actionDescriptor.FilterDescriptors.Add(new
FilterDescriptor
(new ProducesResponseTypeAttribute(typeof(ValidationProblemDetails), 400, "application/problem+json"), FilterScope.Action));
715
actionDescriptor.FilterDescriptors.Add(new
FilterDescriptor
(new ProducesResponseTypeAttribute(typeof(ProblemDetails), 404, "application/problem+json"), FilterScope.Action));
716
actionDescriptor.FilterDescriptors.Add(new
FilterDescriptor
(new ProducesResponseTypeAttribute(409), FilterScope.Action));
795
actionDescriptor.FilterDescriptors.Add(new
FilterDescriptor
(filterAttribute, FilterScope.Action));
DefaultApiDescriptionProviderTest.cs (31)
550
new
FilterDescriptor
(new ProducesResponseTypeAttribute(typeof(Customer), 200), FilterScope.Action)
642
new
FilterDescriptor
(
645
new
FilterDescriptor
(
648
new
FilterDescriptor
(
651
new
FilterDescriptor
(
742
new
FilterDescriptor
(
745
new
FilterDescriptor
(
748
new
FilterDescriptor
(
751
new
FilterDescriptor
(
849
new
FilterDescriptor
(
852
new
FilterDescriptor
(
855
new
FilterDescriptor
(
858
new
FilterDescriptor
(
861
new
FilterDescriptor
(
919
new
FilterDescriptor
(
922
new
FilterDescriptor
(
925
new
FilterDescriptor
(
928
new
FilterDescriptor
(
931
new
FilterDescriptor
(
989
new
FilterDescriptor
(
992
new
FilterDescriptor
(
995
new
FilterDescriptor
(
998
new
FilterDescriptor
(
1001
new
FilterDescriptor
(
1077
new
FilterDescriptor
(filter, FilterScope.Action)
1116
new
FilterDescriptor
(filter, FilterScope.Action)
1160
new
FilterDescriptor
(new ContentTypeAttribute("text/*"), FilterScope.Action)
1184
new
FilterDescriptor
(filter, FilterScope.Action)
1249
new
FilterDescriptor
(new ContentTypeAttribute("text/*"), FilterScope.Action)
1289
new
FilterDescriptor
(new ContentTypeAttribute("text/*"), FilterScope.Action)
1444
new
FilterDescriptor
(new ConsumesAttribute("multipart/form-data"), FilterScope.Action),
Microsoft.AspNetCore.Mvc.Core (3)
ApplicationModels\ControllerActionDescriptorBuilder.cs (3)
174
actionFilters.Select(f => new
FilterDescriptor
(f, FilterScope.Action))
175
.Concat(controllerFilters.Select(f => new
FilterDescriptor
(f, FilterScope.Controller)))
176
.Concat(globalFilters.Select(f => new
FilterDescriptor
(f, FilterScope.Global)))
Microsoft.AspNetCore.Mvc.Core.Test (37)
ConsumesAttributeTests.cs (14)
88
new List<FilterDescriptor>() { new
FilterDescriptor
(constraint, FilterScope.Action) }
112
new List<FilterDescriptor>() { new
FilterDescriptor
(constraint1, FilterScope.Action) }
119
new List<FilterDescriptor>() { new
FilterDescriptor
(constraint2.Object, FilterScope.Action) }
150
new List<FilterDescriptor>() { new
FilterDescriptor
(constraint1, FilterScope.Action) }
157
new List<FilterDescriptor>() { new
FilterDescriptor
(constraint2.Object, FilterScope.Action) }
187
new List<FilterDescriptor>() { new
FilterDescriptor
(constraint1, FilterScope.Action) }
194
new List<FilterDescriptor>() { new
FilterDescriptor
(constraint2, FilterScope.Action) }
228
new List<FilterDescriptor>() { new
FilterDescriptor
(constraint1, FilterScope.Action) }
235
new List<FilterDescriptor>() { new
FilterDescriptor
(constraint2, FilterScope.Action) }
266
new List<FilterDescriptor>() { new
FilterDescriptor
(constraint1, FilterScope.Action) }
273
new List<FilterDescriptor>() { new
FilterDescriptor
(constraint2, FilterScope.Action) }
307
new List<FilterDescriptor>() { new
FilterDescriptor
(consumesFilter, FilterScope.Action) }
337
new List<FilterDescriptor>() { new
FilterDescriptor
(consumesFilter, FilterScope.Action) }
366
new List<FilterDescriptor>() { new
FilterDescriptor
(consumesFilter, FilterScope.Action) }
Filters\FilterFactoryTest.cs (16)
34
var filter = new
FilterDescriptor
(new TypeFilterAttribute(typeof(object)), FilterScope.Global);
60
new
FilterDescriptor
(staticFilter1, FilterScope.Action),
61
new
FilterDescriptor
(staticFilter2, FilterScope.Action),
97
new
FilterDescriptor
(filter1, FilterScope.Action),
98
new
FilterDescriptor
(filter2, FilterScope.Action),
99
new
FilterDescriptor
(filter3, FilterScope.Action),
123
new
FilterDescriptor
(filter1, FilterScope.Action),
124
new
FilterDescriptor
(filter2, FilterScope.Action),
125
new
FilterDescriptor
(filter3, FilterScope.Action),
151
new
FilterDescriptor
(new TestFilterFactory() { IsReusable = true }, FilterScope.Action),
152
new
FilterDescriptor
(staticFilter, FilterScope.Action),
182
new
FilterDescriptor
(new TestFilterFactory() { IsReusable = false }, FilterScope.Action),
183
new
FilterDescriptor
(staticFilter, FilterScope.Action),
215
new FilterItem(new
FilterDescriptor
(filter, FilterScope.Global), filter)
224
new
FilterDescriptor
(new TestFilterFactory() { IsReusable = false }, FilterScope.Action),
225
new
FilterDescriptor
(staticFilter, FilterScope.Action),
Filters\FilterProviderTest.cs (4)
21
new FilterItem(new
FilterDescriptor
(filter, FilterScope.Global)),
52
new FilterItem(new
FilterDescriptor
(filterFactory.Object, FilterScope.Global)),
85
new FilterItem(new
FilterDescriptor
(filterFactory.Object, FilterScope.Global)),
116
new FilterItem(new
FilterDescriptor
(filterFactory.Object, FilterScope.Global)),
Infrastructure\ControllerActionInvokerCacheTest.cs (2)
27
new
FilterDescriptor
(filter, FilterScope.Action)
47
new
FilterDescriptor
(filter, FilterScope.Action)
Infrastructure\ControllerActionInvokerProviderTest.cs (1)
57
actionDescriptor.FilterDescriptors.Add(new
FilterDescriptor
(filterAttribute, FilterScope.Action));
Microsoft.AspNetCore.Mvc.Cors.Test (4)
CorsAuthorizationFilterTest.cs (4)
30
new[] { new
FilterDescriptor
(filter, FilterScope.Action) },
60
new[] { new
FilterDescriptor
(filter, FilterScope.Action) },
81
new[] { new
FilterDescriptor
(filter, FilterScope.Action) },
104
new[] { new
FilterDescriptor
(filter, FilterScope.Action) },
Microsoft.AspNetCore.Mvc.RazorPages (2)
ApplicationModels\CompiledPageActionDescriptorBuilder.cs (2)
28
globalFilters.Select(f => new
FilterDescriptor
(f, FilterScope.Global)),
29
applicationModel.Filters.Select(f => new
FilterDescriptor
(f, FilterScope.Action)))