95 references to FilterScope
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)
644
FilterScope
.Action),
647
FilterScope
.Action),
650
FilterScope
.Action),
653
FilterScope
.Action),
744
FilterScope
.Action),
747
FilterScope
.Action),
750
FilterScope
.Action),
753
FilterScope
.Action)
851
FilterScope
.Action),
854
FilterScope
.Action),
857
FilterScope
.Action),
860
FilterScope
.Action),
863
FilterScope
.Action)
921
FilterScope
.Action),
924
FilterScope
.Action),
927
FilterScope
.Action),
930
FilterScope
.Action),
933
FilterScope
.Action)
991
FilterScope
.Action),
994
FilterScope
.Action),
997
FilterScope
.Action),
1000
FilterScope
.Action),
1003
FilterScope
.Action)
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 (40)
ApplicationModels\ControllerActionDescriptorProviderTests.cs (3)
70
Assert.Equal(
FilterScope
.Global, filter1.Scope);
74
Assert.Equal(
FilterScope
.Controller, filter2.Scope);
78
Assert.Equal(
FilterScope
.Action, filter3.Scope);
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)))
Microsoft.AspNetCore.Mvc.RazorPages.Test (2)
ApplicationModels\CompiledPageActionDescriptorBuilderTest.cs (2)
175
Assert.Equal(
FilterScope
.Global, filterDescriptor.Scope);
180
Assert.Equal(
FilterScope
.Action, filterDescriptor.Scope);