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