90 instantiations of 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)))
84 references to FilterDescriptor
Microsoft.AspNetCore.Mvc.Abstractions (12)
Abstractions\ActionDescriptor.cs (2)
65public IList<FilterDescriptor> FilterDescriptors { get; set; } = Array.Empty<FilterDescriptor>();
Filters\FilterDescriptor.cs (2)
12/// <see cref="FilterDescriptor"/> describes an <see cref="IFilterMetadata"/> with an order and scope. 28/// Creates a new <see cref="FilterDescriptor"/>.
Filters\FilterItem.cs (6)
20/// <param name="descriptor">The <see cref="FilterDescriptor"/>.</param> 21public FilterItem(FilterDescriptor descriptor) 31/// <param name="descriptor">The <see cref="FilterDescriptor"/>.</param> 33public FilterItem(FilterDescriptor descriptor, IFilterMetadata filter) 42/// Gets the <see cref="FilterDescriptor"/> containing the filter metadata. 44public FilterDescriptor Descriptor { get; } = default!;
Filters\FilterProviderContext.cs (2)
16/// The <see cref="FilterItem"/>s, initially created from <see cref="FilterDescriptor"/>s or a cache entry. 33/// Gets or sets the <see cref="FilterItem"/>s, initially created from <see cref="FilterDescriptor"/>s or a
Microsoft.AspNetCore.Mvc.ApiExplorer.Test (19)
ApiResponseTypeProviderTest.cs (1)
790FilterDescriptors = new List<FilterDescriptor>(),
DefaultApiDescriptionProviderTest.cs (18)
549action.FilterDescriptors = new List<FilterDescriptor>{ 636public static TheoryData<Type, string, List<FilterDescriptor>> ReturnsActionResultWithProducesAndProducesContentTypeData 640var filterDescriptors = new List<FilterDescriptor>() 656return new TheoryData<Type, string, List<FilterDescriptor>> 687List<FilterDescriptor> filterDescriptors) 733public static TheoryData<Type, string, List<FilterDescriptor>> ReturnsVoidOrTaskWithProducesContentTypeData 737var filterDescriptors = new List<FilterDescriptor>() 756return new TheoryData<Type, string, List<FilterDescriptor>> 797List<FilterDescriptor> filterDescriptors) 844action.FilterDescriptors = new List<FilterDescriptor>() 914action.FilterDescriptors = new List<FilterDescriptor>() 984action.FilterDescriptors = new List<FilterDescriptor>() 1075action.FilterDescriptors = new List<FilterDescriptor> 1114action.FilterDescriptors = new List<FilterDescriptor> 1158action.FilterDescriptors = new List<FilterDescriptor> 1182action.FilterDescriptors = new List<FilterDescriptor> 1247action.FilterDescriptors = new List<FilterDescriptor> 1287action.FilterDescriptors = new List<FilterDescriptor>
Microsoft.AspNetCore.Mvc.Core (3)
Filters\FilterDescriptorOrderComparer.cs (3)
6internal sealed class FilterDescriptorOrderComparer : IComparer<FilterDescriptor> 10public int Compare(FilterDescriptor? x, FilterDescriptor? y)
Microsoft.AspNetCore.Mvc.Core.Test (32)
ApplicationModels\ControllerActionDescriptorProviderTests.cs (3)
68var filter1 = descriptor.FilterDescriptors[0]; 72var filter2 = descriptor.FilterDescriptors[1]; 76var filter3 = descriptor.FilterDescriptors[2];
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 (3)
17var actionContext = CreateActionContext(new FilterDescriptor[0]); 34var filter = new FilterDescriptor(new TypeFilterAttribute(typeof(object)), FilterScope.Global); 326private static ActionContext CreateActionContext(FilterDescriptor[] filterDescriptors)
Filters\FilterProviderTest.cs (1)
142actionContext.ActionDescriptor.FilterDescriptors = new List<FilterDescriptor>(
Filters\MiddlewareFilterTest.cs (1)
237FilterDescriptors = new List<FilterDescriptor>(),
Infrastructure\ControllerActionInvokerCacheTest.cs (1)
112private static ControllerContext CreateControllerContext(FilterDescriptor[] filterDescriptors)
Infrastructure\ControllerActionInvokerProviderTest.cs (1)
51FilterDescriptors = new List<FilterDescriptor>(),
Infrastructure\ControllerActionInvokerTest.cs (8)
35FilterDescriptors = new List<FilterDescriptor>(), 76FilterDescriptors = new List<FilterDescriptor>(), 107FilterDescriptors = new List<FilterDescriptor>(), 150FilterDescriptors = new List<FilterDescriptor>(), 1400FilterDescriptors = new List<FilterDescriptor>() 1558FilterDescriptors = new List<FilterDescriptor>(), 1608FilterDescriptors = new List<FilterDescriptor>(), 1650FilterDescriptors = new List<FilterDescriptor>(),
Microsoft.AspNetCore.Mvc.Cors.Test (1)
CorsAuthorizationFilterTest.cs (1)
130FilterDescriptor[] filterDescriptors,
Microsoft.AspNetCore.Mvc.RazorPages (1)
Infrastructure\PageActionDescriptorProvider.cs (1)
104FilterDescriptors = Array.Empty<FilterDescriptor>(),
Microsoft.AspNetCore.Mvc.RazorPages.Test (16)
ApplicationModels\CompiledPageActionDescriptorBuilderTest.cs (5)
25FilterDescriptors = new List<FilterDescriptor>(), 53FilterDescriptors = new List<FilterDescriptor>(), 104FilterDescriptors = new List<FilterDescriptor>(), 146FilterDescriptors = new List<FilterDescriptor>(), 408FilterDescriptors = new List<FilterDescriptor>(),
Infrastructure\PageActionInvokerProviderTest.cs (11)
33FilterDescriptors = new FilterDescriptor[0], 83FilterDescriptors = new FilterDescriptor[0] 157FilterDescriptors = new FilterDescriptor[0], 205FilterDescriptors = new FilterDescriptor[0], 251FilterDescriptors = new FilterDescriptor[0], 282FilterDescriptors = new FilterDescriptor[0], 316FilterDescriptors = new FilterDescriptor[0], 322FilterDescriptors = new FilterDescriptor[0], 371FilterDescriptors = new FilterDescriptor[0], 425FilterDescriptors = new FilterDescriptor[0], 488FilterDescriptors = Array.Empty<FilterDescriptor>(),