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