25 interfaces inheriting from IFilterMetadata
Microsoft.AspNetCore.Mvc.Abstractions (13)
Authorization\IAllowAnonymousFilter.cs (1)
11
public interface IAllowAnonymousFilter :
IFilterMetadata
Filters\IActionFilter.cs (1)
9
public interface IActionFilter :
IFilterMetadata
Filters\IAsyncActionFilter.cs (1)
9
public interface IAsyncActionFilter :
IFilterMetadata
Filters\IAsyncAuthorizationFilter.cs (1)
9
public interface IAsyncAuthorizationFilter :
IFilterMetadata
Filters\IAsyncExceptionFilter.cs (1)
9
public interface IAsyncExceptionFilter :
IFilterMetadata
Filters\IAsyncResourceFilter.cs (1)
10
public interface IAsyncResourceFilter :
IFilterMetadata
Filters\IAsyncResultFilter.cs (1)
25
public interface IAsyncResultFilter :
IFilterMetadata
Filters\IAuthorizationFilter.cs (1)
9
public interface IAuthorizationFilter :
IFilterMetadata
Filters\IExceptionFilter.cs (1)
9
public interface IExceptionFilter :
IFilterMetadata
Filters\IFilterFactory.cs (1)
9
public interface IFilterFactory :
IFilterMetadata
Filters\IOrderedFilter.cs (1)
9
public interface IOrderedFilter :
IFilterMetadata
Filters\IResourceFilter.cs (1)
10
public interface IResourceFilter :
IFilterMetadata
Filters\IResultFilter.cs (1)
25
public interface IResultFilter :
IFilterMetadata
Microsoft.AspNetCore.Mvc.Core (8)
ApiExplorer\IApiRequestMetadataProvider.cs (1)
12
public interface IApiRequestMetadataProvider :
IFilterMetadata
ApiExplorer\IApiResponseMetadataProvider.cs (1)
13
public interface IApiResponseMetadataProvider :
IFilterMetadata
Filters\IOutputCacheFilter.cs (1)
9
internal interface IOutputCacheFilter :
IFilterMetadata
Filters\IResponseCacheFilter.cs (1)
9
internal interface IResponseCacheFilter :
IFilterMetadata
Formatters\IFormatFilter.cs (1)
11
internal interface IFormatFilter :
IFilterMetadata
Infrastructure\IApiBehaviorMetadata.cs (1)
17
public interface IApiBehaviorMetadata :
IFilterMetadata
IRequestFormLimitsPolicy.cs (1)
11
public interface IRequestFormLimitsPolicy :
IFilterMetadata
IRequestSizePolicy.cs (1)
11
public interface IRequestSizePolicy :
IFilterMetadata
Microsoft.AspNetCore.Mvc.RazorPages (2)
Filters\IAsyncPageFilter.cs (1)
10
public interface IAsyncPageFilter :
IFilterMetadata
Filters\IPageFilter.cs (1)
10
public interface IPageFilter :
IFilterMetadata
Microsoft.AspNetCore.Mvc.ViewFeatures (2)
Filters\ISaveTempDataCallback.cs (1)
8
internal interface ISaveTempDataCallback :
IFilterMetadata
IAntiforgeryPolicy.cs (1)
11
public interface IAntiforgeryPolicy :
IFilterMetadata
14 implementations of IFilterMetadata
BasicWebSite (1)
VndErrorAttribute.cs (1)
9
public class VndErrorAttribute : Attribute,
IFilterMetadata
Microsoft.AspNetCore.Mvc.Abstractions.Test (2)
Filters\FilterContextTest.cs (2)
111
internal class ITestFilterPolicy :
IFilterMetadata
115
internal class IAnotherTestFilterPolicy :
IFilterMetadata
Microsoft.AspNetCore.Mvc.ApiExplorer.Test (1)
DefaultApiDescriptionProviderTest.cs (1)
2863
IFilterMetadata
,
Microsoft.AspNetCore.Mvc.Core.Test (10)
ApplicationModels\ActionModelTest.cs (1)
150
private class MyFilterAttribute : Attribute,
IFilterMetadata
ApplicationModels\ControllerActionDescriptorProviderTests.cs (1)
1492
private class MyFilterAttribute : Attribute,
IFilterMetadata
ApplicationModels\ControllerModelTest.cs (1)
154
private class MyFilterAttribute : Attribute,
IFilterMetadata
ApplicationModels\DefaultApplicationModelProviderTest.cs (1)
1755
private class MyFilterAttribute : Attribute,
IFilterMetadata
Filters\FilterCollectionTest.cs (1)
152
private class MyFilter :
IFilterMetadata
, IOrderedFilter
Filters\FilterFactoryTest.cs (2)
256
private class TestFilter :
IFilterMetadata
321
private class TestOrderedFilter :
IFilterMetadata
, IOrderedFilter
Infrastructure\ControllerActionInvokerCacheTest.cs (1)
60
private class TestFilter :
IFilterMetadata
ServiceFilterAttributeTest.cs (1)
46
public class TestFilter :
IFilterMetadata
TypeFilterAttributeTest.cs (1)
83
public class TestFilter :
IFilterMetadata
535 references to IFilterMetadata
Microsoft.AspNetCore.Mvc.Abstractions (38)
Abstractions\ActionDescriptor.cs (1)
77
internal
IFilterMetadata
[]? CachedReusableFilters { get; set; }
Filters\ActionExecutedContext.cs (2)
20
/// <param name="filters">All applicable <see cref="
IFilterMetadata
"/> implementations.</param>
24
IList<
IFilterMetadata
> filters,
Filters\ActionExecutingContext.cs (2)
18
/// <param name="filters">All applicable <see cref="
IFilterMetadata
"/> implementations.</param>
25
IList<
IFilterMetadata
> filters,
Filters\AuthorizationFilterContext.cs (2)
16
/// <param name="filters">All applicable <see cref="
IFilterMetadata
"/> implementations.</param>
19
IList<
IFilterMetadata
> filters)
Filters\ExceptionContext.cs (2)
21
/// <param name="filters">All applicable <see cref="
IFilterMetadata
"/> implementations.</param>
22
public ExceptionContext(ActionContext actionContext, IList<
IFilterMetadata
> filters)
Filters\FilterContext.cs (9)
17
/// <param name="filters">All applicable <see cref="
IFilterMetadata
"/> implementations.</param>
20
IList<
IFilterMetadata
> filters)
29
/// Gets all applicable <see cref="
IFilterMetadata
"/> implementations.
31
public virtual IList<
IFilterMetadata
> Filters { get; }
34
/// Returns a value indicating whether the provided <see cref="
IFilterMetadata
"/> is the most effective
40
/// <c>true</c> if the provided <see cref="
IFilterMetadata
"/> is the most effective policy, otherwise <c>false</c>.
61
public bool IsEffectivePolicy<TMetadata>(TMetadata policy) where TMetadata :
IFilterMetadata
81
public TMetadata FindEffectivePolicy<TMetadata>() where TMetadata :
IFilterMetadata
86
var
filter = Filters[i];
Filters\FilterDescriptor.cs (6)
9
/// Descriptor for an <see cref="
IFilterMetadata
"/>.
12
/// <see cref="FilterDescriptor"/> describes an <see cref="
IFilterMetadata
"/> with an order and scope.
30
/// <param name="filter">The <see cref="
IFilterMetadata
"/>.</param>
37
public FilterDescriptor(
IFilterMetadata
filter, int filterScope)
51
/// The <see cref="
IFilterMetadata
"/> instance.
53
public
IFilterMetadata
Filter { get; }
Filters\FilterItem.cs (4)
9
/// Used to associate executable filters with <see cref="
IFilterMetadata
"/> instances
33
public FilterItem(FilterDescriptor descriptor,
IFilterMetadata
filter)
47
/// Gets or sets the executable <see cref="
IFilterMetadata
"/> associated with <see cref="Descriptor"/>.
49
public
IFilterMetadata
? Filter { get; set; }
Filters\IFilterContainer.cs (1)
14
IFilterMetadata
FilterDefinition { get; set; }
Filters\IFilterFactory.cs (1)
22
IFilterMetadata
CreateInstance(IServiceProvider serviceProvider);
Filters\ResourceExecutedContext.cs (2)
20
/// <param name="filters">The list of <see cref="
IFilterMetadata
"/> instances.</param>
21
public ResourceExecutedContext(ActionContext actionContext, IList<
IFilterMetadata
> filters)
Filters\ResourceExecutingContext.cs (2)
18
/// <param name="filters">The list of <see cref="
IFilterMetadata
"/> instances.</param>
22
IList<
IFilterMetadata
> filters,
Filters\ResultExecutedContext.cs (2)
20
/// <param name="filters">All applicable <see cref="
IFilterMetadata
"/> implementations.</param>
27
IList<
IFilterMetadata
> filters,
Filters\ResultExecutingContext.cs (2)
16
/// <param name="filters">All applicable <see cref="
IFilterMetadata
"/> implementations.</param>
21
IList<
IFilterMetadata
> filters,
Microsoft.AspNetCore.Mvc.Abstractions.Test (6)
Filters\FilterContextTest.cs (6)
17
var filters = new
IFilterMetadata
[]
37
var filters = new
IFilterMetadata
[]
57
var filters = new
IFilterMetadata
[]
76
var filters = new
IFilterMetadata
[]
96
var filters = new
IFilterMetadata
[]
121
public TestFilterContext(IList<
IFilterMetadata
> filters)
Microsoft.AspNetCore.Mvc.ApiExplorer.Test (2)
ApiResponseTypeProviderTest.cs (2)
793
foreach (
var
filterAttribute in method.GetCustomAttributes().OfType<
IFilterMetadata
>())
Microsoft.AspNetCore.Mvc.Core (190)
ApplicationModels\ActionModel.cs (4)
36
Filters = new List<
IFilterMetadata
>();
60
Filters = new List<
IFilterMetadata
>(other.Filters);
103
/// Gets the <see cref="
IFilterMetadata
"/> instances associated with the action.
105
public IList<
IFilterMetadata
> Filters { get; }
ApplicationModels\ApplicationModel.cs (3)
22
Filters = new List<
IFilterMetadata
>();
45
/// Gets the global <see cref="
IFilterMetadata
"/> instances.
47
public IList<
IFilterMetadata
> Filters { get; }
ApplicationModels\ClientErrorResultFilterConvention.cs (1)
10
/// An <see cref="IActionModelConvention"/> that adds a <see cref="
IFilterMetadata
"/>
ApplicationModels\ControllerActionDescriptorBuilder.cs (3)
169
IEnumerable<
IFilterMetadata
> actionFilters,
170
IEnumerable<
IFilterMetadata
> controllerFilters,
171
IEnumerable<
IFilterMetadata
> globalFilters)
ApplicationModels\ControllerModel.cs (3)
37
Filters = new List<
IFilterMetadata
>();
59
Filters = new List<
IFilterMetadata
>(other.Filters);
120
public IList<
IFilterMetadata
> Filters { get; }
ApplicationModels\DefaultApplicationModelProvider.cs (3)
46
foreach (
var
filter in _mvcOptions.Filters)
168
AddRange(controllerModel.Filters, attributes.OfType<
IFilterMetadata
>());
271
AddRange(actionModel.Filters, attributes.OfType<
IFilterMetadata
>());
ApplicationModels\IFilterModel.cs (3)
9
/// Model that has a list of <see cref="
IFilterMetadata
"/>.
14
/// List of <see cref="
IFilterMetadata
"/>.
16
IList<
IFilterMetadata
> Filters { get; }
ApplicationModels\InvalidModelStateFilterConvention.cs (1)
10
/// An <see cref="IActionModelConvention"/> that adds a <see cref="
IFilterMetadata
"/>
Authorization\AuthorizeFilter.cs (1)
197
IFilterMetadata
IFilterFactory.CreateInstance(IServiceProvider serviceProvider)
Diagnostics\MvcDiagnostics.cs (66)
128
/// <param name="filter">The <see cref="
IFilterMetadata
"/>.</param>
129
public BeforeAuthorizationFilterOnAuthorizationEventData(ActionDescriptor actionDescriptor, AuthorizationFilterContext authorizationContext,
IFilterMetadata
filter)
149
public
IFilterMetadata
Filter { get; }
179
/// <param name="filter">The <see cref="
IFilterMetadata
"/>.</param>
180
public AfterAuthorizationFilterOnAuthorizationEventData(ActionDescriptor actionDescriptor, AuthorizationFilterContext authorizationContext,
IFilterMetadata
filter)
200
public
IFilterMetadata
Filter { get; }
230
/// <param name="filter">The <see cref="
IFilterMetadata
"/>.</param>
231
public BeforeResourceFilterOnResourceExecutionEventData(ActionDescriptor actionDescriptor, ResourceExecutingContext resourceExecutingContext,
IFilterMetadata
filter)
251
public
IFilterMetadata
Filter { get; }
281
/// <param name="filter">The <see cref="
IFilterMetadata
"/>.</param>
282
public AfterResourceFilterOnResourceExecutionEventData(ActionDescriptor actionDescriptor, ResourceExecutedContext resourceExecutedContext,
IFilterMetadata
filter)
302
public
IFilterMetadata
Filter { get; }
332
/// <param name="filter">The <see cref="
IFilterMetadata
"/>.</param>
333
public BeforeResourceFilterOnResourceExecutingEventData(ActionDescriptor actionDescriptor, ResourceExecutingContext resourceExecutingContext,
IFilterMetadata
filter)
353
public
IFilterMetadata
Filter { get; }
383
/// <param name="filter">The <see cref="
IFilterMetadata
"/>.</param>
384
public AfterResourceFilterOnResourceExecutingEventData(ActionDescriptor actionDescriptor, ResourceExecutingContext resourceExecutingContext,
IFilterMetadata
filter)
404
public
IFilterMetadata
Filter { get; }
434
/// <param name="filter">The <see cref="
IFilterMetadata
"/>.</param>
435
public BeforeResourceFilterOnResourceExecutedEventData(ActionDescriptor actionDescriptor, ResourceExecutedContext resourceExecutedContext,
IFilterMetadata
filter)
455
public
IFilterMetadata
Filter { get; }
485
/// <param name="filter">The <see cref="
IFilterMetadata
"/>.</param>
486
public AfterResourceFilterOnResourceExecutedEventData(ActionDescriptor actionDescriptor, ResourceExecutedContext resourceExecutedContext,
IFilterMetadata
filter)
506
public
IFilterMetadata
Filter { get; }
536
/// <param name="filter">The <see cref="
IFilterMetadata
"/>.</param>
537
public BeforeExceptionFilterOnException(ActionDescriptor actionDescriptor, ExceptionContext exceptionContext,
IFilterMetadata
filter)
557
public
IFilterMetadata
Filter { get; }
587
/// <param name="filter">The <see cref="
IFilterMetadata
"/>.</param>
588
public AfterExceptionFilterOnExceptionEventData(ActionDescriptor actionDescriptor, ExceptionContext exceptionContext,
IFilterMetadata
filter)
608
public
IFilterMetadata
Filter { get; }
638
/// <param name="filter">The <see cref="
IFilterMetadata
"/>.</param>
639
public BeforeActionFilterOnActionExecutionEventData(ActionDescriptor actionDescriptor, ActionExecutingContext actionExecutingContext,
IFilterMetadata
filter)
659
public
IFilterMetadata
Filter { get; }
689
/// <param name="filter">The <see cref="
IFilterMetadata
"/>.</param>
690
public AfterActionFilterOnActionExecutionEventData(ActionDescriptor actionDescriptor, ActionExecutedContext actionExecutedContext,
IFilterMetadata
filter)
710
public
IFilterMetadata
Filter { get; }
740
/// <param name="filter">The <see cref="
IFilterMetadata
"/>.</param>
741
public BeforeActionFilterOnActionExecutingEventData(ActionDescriptor actionDescriptor, ActionExecutingContext actionExecutingContext,
IFilterMetadata
filter)
761
public
IFilterMetadata
Filter { get; }
791
/// <param name="filter">The <see cref="
IFilterMetadata
"/>.</param>
792
public AfterActionFilterOnActionExecutingEventData(ActionDescriptor actionDescriptor, ActionExecutingContext actionExecutingContext,
IFilterMetadata
filter)
812
public
IFilterMetadata
Filter { get; }
842
/// <param name="filter">The <see cref="
IFilterMetadata
"/>.</param>
843
public BeforeActionFilterOnActionExecutedEventData(ActionDescriptor actionDescriptor, ActionExecutedContext actionExecutedContext,
IFilterMetadata
filter)
863
public
IFilterMetadata
Filter { get; }
893
/// <param name="filter">The <see cref="
IFilterMetadata
"/>.</param>
894
public AfterActionFilterOnActionExecutedEventData(ActionDescriptor actionDescriptor, ActionExecutedContext actionExecutedContext,
IFilterMetadata
filter)
914
public
IFilterMetadata
Filter { get; }
1054
/// <param name="filter">The <see cref="
IFilterMetadata
"/>.</param>
1055
public BeforeResultFilterOnResultExecutionEventData(ActionDescriptor actionDescriptor, ResultExecutingContext resultExecutingContext,
IFilterMetadata
filter)
1075
public
IFilterMetadata
Filter { get; }
1105
/// <param name="filter">The <see cref="
IFilterMetadata
"/>.</param>
1106
public AfterResultFilterOnResultExecutionEventData(ActionDescriptor actionDescriptor, ResultExecutedContext resultExecutedContext,
IFilterMetadata
filter)
1126
public
IFilterMetadata
Filter { get; }
1156
/// <param name="filter">The <see cref="
IFilterMetadata
"/>.</param>
1157
public BeforeResultFilterOnResultExecutingEventData(ActionDescriptor actionDescriptor, ResultExecutingContext resultExecutingContext,
IFilterMetadata
filter)
1177
public
IFilterMetadata
Filter { get; }
1207
/// <param name="filter">The <see cref="
IFilterMetadata
"/>.</param>
1208
public AfterResultFilterOnResultExecutingEventData(ActionDescriptor actionDescriptor, ResultExecutingContext resultExecutingContext,
IFilterMetadata
filter)
1228
public
IFilterMetadata
Filter { get; }
1258
/// <param name="filter">The <see cref="
IFilterMetadata
"/>.</param>
1259
public BeforeResultFilterOnResultExecutedEventData(ActionDescriptor actionDescriptor, ResultExecutedContext resultExecutedContext,
IFilterMetadata
filter)
1279
public
IFilterMetadata
Filter { get; }
1309
/// <param name="filter">The <see cref="
IFilterMetadata
"/>.</param>
1310
public AfterResultFilterOnResultExecutedEventData(ActionDescriptor actionDescriptor, ResultExecutedContext resultExecutedContext,
IFilterMetadata
filter)
1330
public
IFilterMetadata
Filter { get; }
DisableRequestSizeLimitAttribute.cs (1)
42
public
IFilterMetadata
CreateInstance(IServiceProvider serviceProvider)
Filters\DefaultFilterProvider.cs (2)
42
var
filter = filterItem.Descriptor.Filter;
66
private static void ApplyFilterToContainer(object actualFilter,
IFilterMetadata
filterMetadata)
Filters\FilterCollection.cs (42)
10
/// A collection of <see cref="
IFilterMetadata
"/>.
12
public class FilterCollection : Collection<
IFilterMetadata
>
15
/// Adds a type representing a <see cref="
IFilterMetadata
"/>.
17
/// <typeparam name="TFilterType">Type representing a <see cref="
IFilterMetadata
"/>.</typeparam>
18
/// <returns>A <see cref="
IFilterMetadata
"/> representing the added type.</returns>
25
public
IFilterMetadata
Add<TFilterType>() where TFilterType :
IFilterMetadata
31
/// Adds a type representing a <see cref="
IFilterMetadata
"/>.
33
/// <param name="filterType">Type representing a <see cref="
IFilterMetadata
"/>.</param>
34
/// <returns>A <see cref="
IFilterMetadata
"/> representing the added type.</returns>
41
public
IFilterMetadata
Add(Type filterType)
49
/// Adds a type representing a <see cref="
IFilterMetadata
"/>.
51
/// <typeparam name="TFilterType">Type representing a <see cref="
IFilterMetadata
"/>.</typeparam>
53
/// <returns>A <see cref="
IFilterMetadata
"/> representing the added type.</returns>
59
public
IFilterMetadata
Add<TFilterType>(int order) where TFilterType :
IFilterMetadata
65
/// Adds a type representing a <see cref="
IFilterMetadata
"/>.
67
/// <param name="filterType">Type representing a <see cref="
IFilterMetadata
"/>.</param>
69
/// <returns>A <see cref="
IFilterMetadata
"/> representing the added type.</returns>
75
public
IFilterMetadata
Add(Type filterType, int order)
79
if (!typeof(
IFilterMetadata
).IsAssignableFrom(filterType))
83
typeof(
IFilterMetadata
).FullName);
93
/// Adds a type representing a <see cref="
IFilterMetadata
"/>.
95
/// <typeparam name="TFilterType">Type representing a <see cref="
IFilterMetadata
"/>.</typeparam>
96
/// <returns>A <see cref="
IFilterMetadata
"/> representing the added service type.</returns>
103
public
IFilterMetadata
AddService<TFilterType>() where TFilterType :
IFilterMetadata
109
/// Adds a type representing a <see cref="
IFilterMetadata
"/>.
111
/// <param name="filterType">Type representing a <see cref="
IFilterMetadata
"/>.</param>
112
/// <returns>A <see cref="
IFilterMetadata
"/> representing the added service type.</returns>
119
public
IFilterMetadata
AddService(Type filterType)
127
/// Adds a type representing a <see cref="
IFilterMetadata
"/>.
129
/// <typeparam name="TFilterType">Type representing a <see cref="
IFilterMetadata
"/>.</typeparam>
131
/// <returns>A <see cref="
IFilterMetadata
"/> representing the added service type.</returns>
137
public
IFilterMetadata
AddService<TFilterType>(int order) where TFilterType :
IFilterMetadata
143
/// Adds a type representing a <see cref="
IFilterMetadata
"/>.
145
/// <param name="filterType">Type representing a <see cref="
IFilterMetadata
"/>.</param>
147
/// <returns>A <see cref="
IFilterMetadata
"/> representing the added service type.</returns>
153
public
IFilterMetadata
AddService(Type filterType, int order)
157
if (!typeof(
IFilterMetadata
).IsAssignableFrom(filterType))
161
typeof(
IFilterMetadata
).FullName);
Filters\FilterCursor.cs (2)
28
private readonly
IFilterMetadata
[] _filters;
31
public FilterCursor(
IFilterMetadata
[] filters)
Filters\FilterFactory.cs (5)
61
public static
IFilterMetadata
[] CreateUncachedFilters(
91
private static
IFilterMetadata
[] CreateUncachedFiltersCore(
121
return Array.Empty<
IFilterMetadata
>();
125
var filters = new
IFilterMetadata
[count];
129
var
filter = filterItems[i].Filter;
Filters\FilterFactoryResult.cs (2)
10
IFilterMetadata
[] filters)
18
public
IFilterMetadata
[] Filters { get; }
Filters\MiddlewareFilterAttribute.cs (1)
39
public
IFilterMetadata
CreateInstance(IServiceProvider serviceProvider)
FormatFilterAttribute.cs (1)
25
public
IFilterMetadata
CreateInstance(IServiceProvider serviceProvider)
Infrastructure\ClientErrorResultFilterFactory.cs (1)
17
public
IFilterMetadata
CreateInstance(IServiceProvider serviceProvider)
Infrastructure\ControllerActionInvoker.cs (3)
37
IFilterMetadata
[] filters)
576
public ActionExecutingContextSealed(ActionContext actionContext, IList<
IFilterMetadata
> filters, IDictionary<string, object?> actionArguments, object controller) : base(actionContext, filters, actionArguments, controller) { }
581
public ActionExecutedContextSealed(ActionContext actionContext, IList<
IFilterMetadata
> filters, object controller) : base(actionContext, filters, controller) { }
Infrastructure\ControllerActionInvokerCache.cs (2)
40
public (ControllerActionInvokerCacheEntry cacheEntry,
IFilterMetadata
[] filters) GetCachedResult(ControllerContext controllerContext)
44
IFilterMetadata
[] filters;
Infrastructure\IApiBehaviorMetadata.cs (1)
11
/// A <see cref="
IFilterMetadata
"/> that indicates that a type and all derived types are used to serve HTTP API responses.
Infrastructure\ModelStateInvalidFilterFactory.cs (1)
19
public
IFilterMetadata
CreateInstance(IServiceProvider serviceProvider)
Infrastructure\ResourceInvoker.cs (10)
21
protected readonly
IFilterMetadata
[] _filters;
43
IFilterMetadata
[] filters,
414
Log.AuthorizationFailure(_logger, (
IFilterMetadata
)state);
602
Log.ResourceFilterShortCircuited(_logger, (
IFilterMetadata
)state);
1567
IList<
IFilterMetadata
> filters,
1577
IList<
IFilterMetadata
> filters,
1586
public ExceptionContextSealed(ActionContext actionContext, IList<
IFilterMetadata
> filters) : base(actionContext, filters) { }
1590
public ResourceExecutedContextSealed(ActionContext actionContext, IList<
IFilterMetadata
> filters) : base(actionContext, filters) { }
1594
public ResourceExecutingContextSealed(ActionContext actionContext, IList<
IFilterMetadata
> filters, IList<IValueProviderFactory> valueProviderFactories) : base(actionContext, filters, valueProviderFactories) { }
1598
public AuthorizationFilterContextSealed(ActionContext actionContext, IList<
IFilterMetadata
> filters) : base(actionContext, filters) { }
Infrastructure\ResourceInvoker.Log.cs (2)
77
public static partial void AuthorizationFailure(ILogger logger,
IFilterMetadata
authorizationFilter);
80
public static partial void ResourceFilterShortCircuited(ILogger logger,
IFilterMetadata
resourceFilter);
MvcCoreLoggerExtensions.cs (13)
25
public static void AuthorizationFiltersExecutionPlan(this ILogger logger, IEnumerable<
IFilterMetadata
> filters)
36
public static void ResourceFiltersExecutionPlan(this ILogger logger, IEnumerable<
IFilterMetadata
> filters)
47
public static void ActionFiltersExecutionPlan(this ILogger logger, IEnumerable<
IFilterMetadata
> filters)
58
public static void ExceptionFiltersExecutionPlan(this ILogger logger, IEnumerable<
IFilterMetadata
> filters)
69
public static void ResultFiltersExecutionPlan(this ILogger logger, IEnumerable<
IFilterMetadata
> filters)
81
public static partial void BeforeExecutingMethodOnFilter(this ILogger logger, string filterType, string method,
IFilterMetadata
filter);
84
public static partial void AfterExecutingMethodOnFilter(this ILogger logger, string filterType, string method,
IFilterMetadata
filter);
105
public static partial void ResultFilterShortCircuited(this ILogger logger,
IFilterMetadata
resultFilter);
108
public static partial void ExceptionFilterShortCircuited(this ILogger logger,
IFilterMetadata
exceptionFilter);
111
public static partial void ActionFilterShortCircuited(this ILogger logger,
IFilterMetadata
actionFilter);
249
IEnumerable<
IFilterMetadata
> filters)
263
private static string[] GetFilterList(IEnumerable<
IFilterMetadata
> filters)
266
foreach (
var
filter in filters)
MvcOptions.cs (1)
88
/// Gets a collection of <see cref="
IFilterMetadata
"/> which are used to construct filters that
RequestFormLimitsAttribute.cs (1)
165
public
IFilterMetadata
CreateInstance(IServiceProvider serviceProvider)
RequestSizeLimitAttribute.cs (1)
49
public
IFilterMetadata
CreateInstance(IServiceProvider serviceProvider)
ResponseCacheAttribute.cs (1)
118
public
IFilterMetadata
CreateInstance(IServiceProvider serviceProvider)
Routing\ActionEndpointFactory.cs (1)
403
foreach (
var
filter in action.FilterDescriptors.OrderBy(f => f, FilterDescriptorOrderComparer.Comparer).Select(f => f.Filter))
ServiceFilterAttribute.cs (3)
47
public
IFilterMetadata
CreateInstance(IServiceProvider serviceProvider)
51
var
filter = (
IFilterMetadata
)serviceProvider.GetRequiredService(ServiceType);
ServiceFilterOfTAttribute.cs (1)
12
public class ServiceFilterAttribute<TFilter> : ServiceFilterAttribute where TFilter :
IFilterMetadata
TypeFilterAttribute.cs (3)
60
public
IFilterMetadata
CreateInstance(IServiceProvider serviceProvider)
70
var
filter = (
IFilterMetadata
)_factory(serviceProvider, Arguments);
TypeFilterOfTAttribute.cs (1)
10
public class TypeFilterAttribute<TFilter> : TypeFilterAttribute where TFilter :
IFilterMetadata
Microsoft.AspNetCore.Mvc.Core.Test (136)
ApplicationModels\ConsumesConstraintForFormFileParameterConventionTest.cs (2)
25
var
attribute = Assert.Single(action.Filters);
46
var
attribute = Assert.Single(action.Filters);
ApplicationModels\ControllerActionDescriptorProviderTests.cs (3)
56
var provider = GetProvider(typeof(FiltersController).GetTypeInfo(), new
IFilterMetadata
[]
1326
IEnumerable<
IFilterMetadata
> filters = null)
1331
foreach (
var
filter in filters)
ApplicationModels\DefaultApplicationModelProviderTest.cs (2)
381
var
filter = Assert.Single(model.Filters);
398
var
filter = Assert.Single(model.Filters);
Authorization\AuthorizeFilterTest.cs (5)
429
var
result = factory.CreateInstance(new ServiceCollection().BuildServiceProvider());
445
var
result = factory.CreateInstance(new ServiceCollection().BuildServiceProvider());
481
var
result = factory.CreateInstance(serviceProvider);
502
var
result = factory.CreateInstance(serviceProvider);
633
Enumerable.Empty<
IFilterMetadata
>().ToList()
Filters\DisableRequestSizeLimitFilterTest.cs (6)
20
var authorizationFilterContext = CreateAuthorizationFilterContext(new
IFilterMetadata
[] { disableRequestSizeLimitResourceFilter });
39
new
IFilterMetadata
[] { disableRequestSizeLimitResourceFilter, disableRequestSizeLimitResourceFilterFinal });
61
var authorizationFilterContext = CreateAuthorizationFilterContext(new
IFilterMetadata
[] { disableRequestSizeLimitResourceFilter });
80
var authorizationFilterContext = CreateAuthorizationFilterContext(new
IFilterMetadata
[] { disableRequestSizeLimitResourceFilter });
102
var authorizationFilterContext = CreateAuthorizationFilterContext(new
IFilterMetadata
[] { disableRequestSizeLimitResourceFilter });
115
private static AuthorizationFilterContext CreateAuthorizationFilterContext(
IFilterMetadata
[] filters)
Filters\FilterCollectionTest.cs (10)
17
var
added = collection.Add(typeof(MyFilter));
32
var
added = collection.Add<MyFilter>();
47
var
added = collection.Add(typeof(MyFilter), 17);
60
var
added = collection.Add<MyFilter>(17);
72
var expectedMessage = $"The type '{typeof(NonFilter).FullName}' must derive from " + $"'{typeof(
IFilterMetadata
).FullName}'.";
88
var
added = collection.AddService(typeof(MyFilter));
103
var
added = collection.AddService<MyFilter>();
118
var
added = collection.AddService(typeof(MyFilter), 17);
131
var
added = collection.AddService<MyFilter>(17);
143
var expectedMessage = $"The type '{typeof(NonFilter).FullName}' must derive from '{typeof(
IFilterMetadata
).FullName}'.";
Filters\FilterFactoryTest.cs (4)
169
var
currentFactoryCreatedFilter = filters[0];
191
IFilterMetadata
previousFactoryCreatedFilter = null;
196
var
currentFactoryCreatedFilter = filters[0];
276
public
IFilterMetadata
CreateInstance(IServiceProvider serviceProvider)
Filters\FilterProviderTest.cs (7)
17
var
filter = Mock.Of<
IFilterMetadata
>();
43
var
filter = Mock.Of<
IFilterMetadata
>();
74
var
filter = Mock.Of<
IFilterMetadata
>();
112
.Returns(filter.As<
IFilterMetadata
>().Object);
Filters\MiddlewareFilterAttributeTest.cs (1)
32
var
filter = middlewareFilterAttribute.CreateInstance(serviceProvider);
Filters\MiddlewareFilterBuilderTest.cs (3)
132
var context = new ResourceExecutedContext(actionContext, new List<
IFilterMetadata
>())
195
var context = new ResourceExecutedContext(actionContext, new List<
IFilterMetadata
>())
263
var context = new ResourceExecutedContext(actionContext, new List<
IFilterMetadata
>())
Filters\MiddlewareFilterTest.cs (9)
64
new
IFilterMetadata
[]
111
new
IFilterMetadata
[]
149
new
IFilterMetadata
[]
197
new
IFilterMetadata
[]
221
new List<
IFilterMetadata
>(),
228
() => Task.FromResult(new ResourceExecutedContext(new ActionContext(), new List<
IFilterMetadata
>())));
232
IFilterMetadata
[] filters,
257
IFilterMetadata
[] filters,
390
IFilterMetadata
[] filters,
Filters\RequestFormLimitsFilterTest.cs (6)
23
new
IFilterMetadata
[] { requestFormLimitsFilter });
42
new
IFilterMetadata
[] { requestFormLimitsFilter });
65
new
IFilterMetadata
[] { requestFormLimitsFilter });
89
new
IFilterMetadata
[] { requestFormLimitsFilter });
114
new
IFilterMetadata
[] { requestFormLimitsFilter });
130
private static AuthorizationFilterContext CreateAuthorizationFilterContext(
IFilterMetadata
[] filters)
Filters\RequestSizeLimitFilterTest.cs (6)
21
var authorizationFilterContext = CreateAuthorizationFilterContext(new
IFilterMetadata
[] { requestSizeLimitResourceFilter });
42
new
IFilterMetadata
[] { requestSizeLimitResourceFilter, requestSizeLimitResourceFilterFinal });
65
var authorizationFilterContext = CreateAuthorizationFilterContext(new
IFilterMetadata
[] { requestSizeLimitResourceFilter });
85
var authorizationFilterContext = CreateAuthorizationFilterContext(new
IFilterMetadata
[] { requestSizeLimitResourceFilter });
108
var authorizationFilterContext = CreateAuthorizationFilterContext(new
IFilterMetadata
[] { requestSizeLimitResourceFilter });
121
private static AuthorizationFilterContext CreateAuthorizationFilterContext(
IFilterMetadata
[] filters)
Filters\ResponseCacheFilterExecutorTest.cs (2)
533
private ActionExecutingContext GetActionExecutingContext(List<
IFilterMetadata
> filters = null)
537
filters ?? new List<
IFilterMetadata
>(),
Formatters\FormatFilterTest.cs (17)
38
var resourceExecutingContext = mockObjects.CreateResourceExecutingContext(new
IFilterMetadata
[] { });
80
new
IFilterMetadata
[] { },
86
new
IFilterMetadata
[] { },
115
var resourceExecutingContext = mockObjects.CreateResourceExecutingContext(new
IFilterMetadata
[] { });
142
var resourceExecutingContext = mockObjects.CreateResourceExecutingContext(new
IFilterMetadata
[] { });
159
var resourceExecutingContext = mockObjects.CreateResourceExecutingContext(new
IFilterMetadata
[] { });
181
var resourceExecutingContext = mockObjects.CreateResourceExecutingContext(new
IFilterMetadata
[] { produces });
198
var resourceExecutingContext = mockObjects.CreateResourceExecutingContext(new
IFilterMetadata
[] { produces });
219
var resourceExecutingContext = mockObjects.CreateResourceExecutingContext(new
IFilterMetadata
[] { produces });
245
var resourceExecutingContext = mockObjects.CreateResourceExecutingContext(new
IFilterMetadata
[] { produces });
269
var resourceExecutingContext = mockObjects.CreateResourceExecutingContext(new
IFilterMetadata
[] { });
335
new
IFilterMetadata
[] { },
341
new
IFilterMetadata
[] { },
370
new
IFilterMetadata
[] { },
376
new
IFilterMetadata
[] { },
408
public ResourceExecutingContext CreateResourceExecutingContext(
IFilterMetadata
[] filters)
421
new
IFilterMetadata
[] { },
Infrastructure\ClientErrorResultFilterTest.cs (1)
117
Array.Empty<
IFilterMetadata
>(),
Infrastructure\ControllerActionInvokerProviderTest.cs (2)
55
foreach (
var
filterAttribute in method.GetCustomAttributes().OfType<
IFilterMetadata
>())
Infrastructure\ControllerActionInvokerTest.cs (22)
48
var
filter = Mock.Of<
IFilterMetadata
>();
86
var
filter = Mock.Of<
IFilterMetadata
>();
126
new
IFilterMetadata
[] { resourceFilter.Object },
176
new
IFilterMetadata
[] { resourceFilter.Object },
215
new
IFilterMetadata
[] { resourceFilter.Object }, valueProviderFactories: valueProviderFactories);
247
new
IFilterMetadata
[] { resourceFilter.Object }, valueProviderFactories: valueProviderFactories);
348
var invoker = CreateInvoker(new
IFilterMetadata
[]
413
var invoker = CreateInvoker(new
IFilterMetadata
[]
472
var invoker = CreateInvoker(new
IFilterMetadata
[]
628
var invoker = CreateInvoker(new
IFilterMetadata
[] { filter1.Object, filter2.Object });
673
new
IFilterMetadata
[] { actionFilter.Object, resultFilter.Object },
713
var invoker = CreateInvoker(new
IFilterMetadata
[] { resourceFilter.Object, actionFilter.Object });
751
var invoker = CreateInvoker(new
IFilterMetadata
[] { resourceFilter.Object, actionFilter.Object });
790
var invoker = CreateInvoker(new
IFilterMetadata
[] { resourceFilter.Object, exceptionFilter.Object }, exception: Exception);
835
new
IFilterMetadata
[]
1439
new
IFilterMetadata
[0]);
1565
new
IFilterMetadata
[0],
1600
IFilterMetadata
[] filters,
1643
IFilterMetadata
[] filters,
1672
IFilterMetadata
[] filters,
Infrastructure\ModelStateInvalidFilterTest.cs (1)
76
Array.Empty<
IFilterMetadata
>(),
ModelBinding\UnsupportedContentTypeFilterTest.cs (4)
24
new List<
IFilterMetadata
>(),
57
new List<
IFilterMetadata
>(),
83
new List<
IFilterMetadata
>(),
107
new List<
IFilterMetadata
>(),
MvcCoreLoggerExtensionsTest.cs (6)
138
var filters = new
IFilterMetadata
[]
183
var filters = new
IFilterMetadata
[]
229
var filters = new
IFilterMetadata
[]
275
var filters = new
IFilterMetadata
[]
321
var filters = new
IFilterMetadata
[]
367
var filters = new
IFilterMetadata
[]
ProducesAttributeTests.cs (4)
23
var resultExecutingContext = CreateResultExecutingContext(new
IFilterMetadata
[] { producesContentAttribute });
48
var filters = new
IFilterMetadata
[] { producesContentAttribute, formatFilter.Object };
73
var filters = new
IFilterMetadata
[] { producesContentAttribute, formatFilter.Object };
182
private static ResultExecutingContext CreateResultExecutingContext(
IFilterMetadata
[] filters)
RequireHttpsAttributeTests.cs (1)
230
return new AuthorizationFilterContext(actionContext, new
IFilterMetadata
[0]);
ResponseCacheAttributeTest.cs (5)
34
var
createdFilter = responseCache.CreateInstance(GetServiceProvider(cacheProfiles));
163
var
createdFilter = responseCache.CreateInstance(GetServiceProvider(cacheProfiles));
193
var
filter = responseCache.CreateInstance(GetServiceProvider(cacheProfiles));
345
private ActionExecutingContext GetActionExecutingContext(params
IFilterMetadata
[] filters)
349
filters?.ToList() ?? new List<
IFilterMetadata
>(),
ServiceFilterAttributeTest.cs (3)
23
var
filter = serviceFilter.CreateInstance(serviceProvider);
40
var
filter = serviceFilter.CreateInstance(serviceProvider);
54
public
IFilterMetadata
CreateInstance(IServiceProvider serviceProvider)
TypeFilterAttributeTest.cs (4)
25
var
filter = typeFilter.CreateInstance(serviceProvider);
50
var
filter = typeFilter.CreateInstance(serviceProvider);
75
var
filter = typeFilter.CreateInstance(serviceProvider);
108
public
IFilterMetadata
CreateInstance(IServiceProvider serviceProvider)
Microsoft.AspNetCore.Mvc.Core.TestCommon (54)
CommonFilterTest.cs (9)
32
var context = CreateActionExecutingContext(mock.As<
IFilterMetadata
>().Object);
70
var context = CreateActionExecutingContext(mock.As<
IFilterMetadata
>().Object);
101
var context = CreateResultExecutingContext(mock.As<
IFilterMetadata
>().Object);
139
var context = CreateResultExecutingContext(mock.As<
IFilterMetadata
>().Object);
177
var context = CreateResultExecutingContext(mock.As<
IFilterMetadata
>().Object);
193
private static ActionExecutingContext CreateActionExecutingContext(
IFilterMetadata
filter)
197
new
IFilterMetadata
[] { filter, },
210
private static ResultExecutingContext CreateResultExecutingContext(
IFilterMetadata
filter)
214
new
IFilterMetadata
[] { filter, },
CommonResourceInvokerTest.cs (45)
21
IFilterMetadata
filter,
26
return CreateInvoker(new
IFilterMetadata
[] { filter }, exception, result, valueProviderFactories);
30
IFilterMetadata
[] filters,
215
new
IFilterMetadata
[] { filter1.Object, filter2.Object, resultFilter.Object },
281
new
IFilterMetadata
[] { filter1.Object, filter2.Object, resultFilter.Object },
311
var filterMetadata = new
IFilterMetadata
[] { filter1.Object, filter2.Object };
350
new
IFilterMetadata
[] { filter1.Object, filter2.Object, resultFilter.Object },
380
var invoker = CreateInvoker(new
IFilterMetadata
[] { filter1.Object, filter2.Object }, exception: Exception);
418
new
IFilterMetadata
[] { filter1.Object, filter2.Object, resultFilter.Object },
461
new
IFilterMetadata
[] { filter1.Object, filter2.Object, resultFilter.Object },
509
var invoker = CreateInvoker(new
IFilterMetadata
[] { filter.Object, resultFilter.Object }, exception: Exception);
544
new
IFilterMetadata
[] { filter1.Object, filter2.Object, resultFilter.Object },
564
new
IFilterMetadata
[] { exceptionFilter.Object, resultFilter.Object });
675
var invoker = CreateInvoker(new
IFilterMetadata
[] { filter1.Object, filter2.Object, filter3.Object });
714
var invoker = CreateInvoker(new
IFilterMetadata
[]
750
var invoker = CreateInvoker(new
IFilterMetadata
[] { authorizationFilter.Object, resultFilter.Object });
824
var invoker = CreateInvoker(new
IFilterMetadata
[] { filter1.Object, filter2.Object, filter3.Object });
865
var invoker = CreateInvoker(new
IFilterMetadata
[] { filter1.Object, filter2.Object, filter3.Object }, result: Result);
907
var invoker = CreateInvoker(new
IFilterMetadata
[] { filter1.Object, filter2.Object, filter3.Object }, result: Result);
1101
var invoker = CreateInvoker(new
IFilterMetadata
[] { resultFilter1.Object, resultFilter2.Object, resultFilter3.Object });
1143
var invoker = CreateInvoker(new
IFilterMetadata
[] { resultFilter1.Object, resultFilter2.Object, resultFilter3.Object });
1171
var invoker = CreateInvoker(new
IFilterMetadata
[] { resourceFilter.Object });
1260
var invoker = CreateInvoker(new
IFilterMetadata
[] { resourceFilter.Object, exceptionFilter.Object }, exception: Exception);
1299
var invoker = CreateInvoker(new
IFilterMetadata
[] { resourceFilter.Object, resultFilter.Object });
1327
var invoker = CreateInvoker(new
IFilterMetadata
[] { resourceFilter.Object }, exception: Exception);
1366
var invoker = CreateInvoker(new
IFilterMetadata
[] { resourceFilter.Object, resultFilter.Object });
1399
var invoker = CreateInvoker(new
IFilterMetadata
[] { resourceFilter.Object }, exception: Exception);
1435
var invoker = CreateInvoker(new
IFilterMetadata
[] { resourceFilter1.Object, resourceFilter2.Object }, exception: Exception);
1471
var invoker = CreateInvoker(new
IFilterMetadata
[] { resourceFilter1.Object, resourceFilter2.Object }, exception: Exception);
1507
var invoker = CreateInvoker(new
IFilterMetadata
[] { resourceFilter1.Object, resourceFilter2.Object }, exception: Exception);
1553
new
IFilterMetadata
[]
1601
new
IFilterMetadata
[]
1651
new
IFilterMetadata
[]
1690
var invoker = CreateInvoker(new
IFilterMetadata
[] { resourceFilter.Object, });
1720
var invoker = CreateInvoker(new
IFilterMetadata
[] { authorizationFilter.Object, resourceFilter.Object, });
1752
var invoker = CreateInvoker(new
IFilterMetadata
[] { authorizationFilter.Object, resultFilter.Object, });
1782
var invoker = CreateInvoker(new
IFilterMetadata
[] { authorizationFilter.Object, resultFilter.Object, });
1814
var invoker = CreateInvoker(new
IFilterMetadata
[] { authorizationFilter.Object, resultFilter1.Object, resultFilter2.Object, resultFilter3.Object, });
1855
var invoker = CreateInvoker(new
IFilterMetadata
[] { resourceFilter.Object, resultFilter.Object, });
1882
var invoker = CreateInvoker(new
IFilterMetadata
[] { resourceFilter.Object, resultFilter.Object, });
1911
var invoker = CreateInvoker(new
IFilterMetadata
[] { resourceFilter.Object, resultFilter1.Object, resultFilter2.Object, resultFilter3.Object, });
1952
var invoker = CreateInvoker(new
IFilterMetadata
[] { exceptionFilter.Object, resultFilter.Object, }, Exception);
1979
var invoker = CreateInvoker(new
IFilterMetadata
[] { exceptionFilter.Object, resultFilter.Object, }, Exception);
2009
new
IFilterMetadata
[] { exceptionFilter.Object, resultFilter1.Object, resultFilter2.Object, resultFilter3.Object, },
2061
new
IFilterMetadata
[] { resultFilter1.Object, resultFilter2.Object, resultFilter3.Object, resultFilter4.Object });
Microsoft.AspNetCore.Mvc.Cors (1)
CorsAuthorizationFilterFactory.cs (1)
34
public
IFilterMetadata
CreateInstance(IServiceProvider serviceProvider)
Microsoft.AspNetCore.Mvc.Cors.Test (3)
DisableCorsAuthorizationFilterTest.cs (3)
25
new List<
IFilterMetadata
>());
44
new List<
IFilterMetadata
>());
66
new List<
IFilterMetadata
>());
Microsoft.AspNetCore.Mvc.RazorPages (19)
ApplicationModels\DefaultPageApplicationModelProvider.cs (1)
158
if (pageModel.HandlerTypeAttributes[i] is
IFilterMetadata
filter)
ApplicationModels\PageApplicationModel.cs (4)
41
Filters = new List<
IFilterMetadata
>();
64
Filters = new List<
IFilterMetadata
>(other.Filters);
107
/// Gets the applicable <see cref="
IFilterMetadata
"/> instances.
109
public IList<
IFilterMetadata
> Filters { get; }
DependencyInjection\PageConventionCollectionExtensions.cs (3)
25
Func<PageApplicationModel,
IFilterMetadata
> factory)
37
/// <param name="filter">The <see cref="
IFilterMetadata
"/> to add.</param>
39
public static PageConventionCollection ConfigureFilter(this PageConventionCollection conventions,
IFilterMetadata
filter)
Filters\PageHandlerExecutedContext.cs (1)
29
IList<
IFilterMetadata
> filters,
Filters\PageHandlerExecutingContext.cs (1)
26
IList<
IFilterMetadata
> filters,
Filters\PageHandlerSelectedContext.cs (1)
24
IList<
IFilterMetadata
> filters,
Filters\PageSaveTempDataPropertyFilterFactory.cs (1)
20
public
IFilterMetadata
CreateInstance(IServiceProvider serviceProvider)
Filters\PageViewDataAttributeFilterFactory.cs (1)
20
public
IFilterMetadata
CreateInstance(IServiceProvider serviceProvider)
Infrastructure\PageActionInvoker.cs (1)
41
IFilterMetadata
[] filterMetadata,
Infrastructure\PageActionInvokerCache.cs (2)
41
public (PageActionInvokerCacheEntry cacheEntry,
IFilterMetadata
[] filters) GetCachedResult(ActionContext actionContext)
51
IFilterMetadata
[] filters;
PageLoggerExtensions.cs (3)
145
public static partial void BeforeExecutingMethodOnFilter(this ILogger logger, string filterType, string method,
IFilterMetadata
filter);
148
public static partial void AfterExecutingMethodOnFilter(this ILogger logger, string filterType, string method,
IFilterMetadata
filter);
153
IFilterMetadata
pageFilter);
Microsoft.AspNetCore.Mvc.RazorPages.Test (59)
ApplicationModels\CompiledPageActionDescriptorBuilderTest.cs (6)
65
Mock.Of<
IFilterMetadata
>(),
66
Mock.Of<
IFilterMetadata
>(),
116
Mock.Of<
IFilterMetadata
>(),
117
Mock.Of<
IFilterMetadata
>(),
158
Mock.Of<
IFilterMetadata
>(),
163
Mock.Of<
IFilterMetadata
>(),
ApplicationModels\TempDataFilterPageApplicationModelProviderTest.cs (1)
73
var
filter = Assert.Single(context.PageApplicationModel.Filters);
ApplicationModels\ViewDataAttributePageApplicationModelProviderTest.cs (1)
39
var
filter = Assert.Single(context.PageApplicationModel.Filters);
DependencyInjection\PageConventionCollectionExtensionsTest.cs (2)
22
var
filter = Mock.Of<
IFilterMetadata
>();
Filters\PageHandlerResultFilterTest.cs (8)
33
Array.Empty<
IFilterMetadata
>(),
38
Array.Empty<
IFilterMetadata
>(),
74
Array.Empty<
IFilterMetadata
>(),
79
Array.Empty<
IFilterMetadata
>(),
116
Array.Empty<
IFilterMetadata
>(),
121
Array.Empty<
IFilterMetadata
>(),
148
Array.Empty<
IFilterMetadata
>(),
153
Array.Empty<
IFilterMetadata
>(),
Filters\PageSaveTempDataPropertyFilterFactoryTest.cs (1)
24
var
filter = factory.CreateInstance(serviceProvider);
Filters\PageSaveTempDataPropertyFilterTest.cs (3)
65
Array.Empty<
IFilterMetadata
>(),
106
Array.Empty<
IFilterMetadata
>(),
146
Array.Empty<
IFilterMetadata
>(),
Filters\PageViewDataAttributeFilterFactoryTest.cs (1)
23
var
result = filterFactory.CreateInstance(Mock.Of<IServiceProvider>());
Filters\PageViewDataAttributeFilterTest.cs (2)
26
var context = new PageHandlerExecutingContext(pageContext, new
IFilterMetadata
[0], new HandlerMethodDescriptor(), new Dictionary<string, object>(), handler);
45
var context = new PageHandlerExecutingContext(pageContext, new
IFilterMetadata
[0], new HandlerMethodDescriptor(), new Dictionary<string, object>(), handler);
Infrastructure\DisallowOptionsRequestsPageFilterTest.cs (1)
129
return new PageHandlerExecutingContext(pageContext, Array.Empty<
IFilterMetadata
>(), handlerMethodDescriptor, new Dictionary<string, object>(), new object());
Infrastructure\PageActionInvokerTest.cs (20)
103
new
IFilterMetadata
[] { resourceFilter.Object }, valueProviderFactories: valueProviderFactories);
137
new
IFilterMetadata
[] { resourceFilter.Object }, valueProviderFactories: valueProviderFactories);
191
var filters = new
IFilterMetadata
[] { pageFilter.Object, resultFilter.Object };
247
var filters = new
IFilterMetadata
[] { pageFilter.Object, resultFilter.Object };
304
var filters = new
IFilterMetadata
[] { pageFilter.Object, resultFilter.Object };
392
var filters = new
IFilterMetadata
[] { filter1.Object, filter2.Object };
448
var filters = new
IFilterMetadata
[] { filter1.Object, filter2.Object };
485
var invoker = CreateInvoker(new
IFilterMetadata
[] { pageFilter.Object }, result: new PageResult());
862
var invoker = CreateInvoker(new
IFilterMetadata
[]
930
var invoker = CreateInvoker(new
IFilterMetadata
[]
992
var invoker = CreateInvoker(new
IFilterMetadata
[]
1155
var invoker = CreateInvoker(new
IFilterMetadata
[] { filter1.Object, filter2.Object });
1201
new
IFilterMetadata
[] { pageFilter.Object, resultFilter.Object },
1242
var invoker = CreateInvoker(new
IFilterMetadata
[] { resourceFilter.Object, pageFilter.Object });
1281
var invoker = CreateInvoker(new
IFilterMetadata
[] { resourceFilter.Object, pageFilter.Object });
1320
var invoker = CreateInvoker(new
IFilterMetadata
[] { resourceFilter.Object, exceptionFilter.Object }, exception: Exception);
1368
new
IFilterMetadata
[]
1438
IFilterMetadata
[] filters,
1482
IFilterMetadata
[] filters,
1571
filters ?? Array.Empty<
IFilterMetadata
>(),
Infrastructure\PageHandlerPageFilterTest.cs (8)
27
Array.Empty<
IFilterMetadata
>(),
33
Array.Empty<
IFilterMetadata
>(),
75
Array.Empty<
IFilterMetadata
>(),
81
Array.Empty<
IFilterMetadata
>(),
118
Array.Empty<
IFilterMetadata
>(),
124
Array.Empty<
IFilterMetadata
>(),
151
Array.Empty<
IFilterMetadata
>(),
157
Array.Empty<
IFilterMetadata
>(),
PageModelTest.cs (5)
1853
Array.Empty<
IFilterMetadata
>(),
1859
Array.Empty<
IFilterMetadata
>(),
1887
Array.Empty<
IFilterMetadata
>(),
1893
Array.Empty<
IFilterMetadata
>(),
1922
Array.Empty<
IFilterMetadata
>(),
Microsoft.AspNetCore.Mvc.ViewFeatures (8)
AutoValidateAntiforgeryTokenAttribute.cs (1)
47
public
IFilterMetadata
CreateInstance(IServiceProvider serviceProvider)
Filters\AntiforgeryApplicationModelProvider.cs (1)
52
private static bool HasValidAntiforgeryMetadata(IReadOnlyList<object> attributes, IList<
IFilterMetadata
> filters)
Filters\ControllerSaveTempDataPropertyFilterFactory.cs (1)
20
public
IFilterMetadata
CreateInstance(IServiceProvider serviceProvider)
Filters\ControllerViewDataAttributeFilterFactory.cs (1)
20
public
IFilterMetadata
CreateInstance(IServiceProvider serviceProvider)
Filters\SaveTempDataFilter.cs (2)
130
IList<
IFilterMetadata
> filters,
155
public IList<
IFilterMetadata
> Filters { get; set; }
SaveTempDataAttribute.cs (1)
36
public
IFilterMetadata
CreateInstance(IServiceProvider serviceProvider)
ValidateAntiForgeryTokenAttribute.cs (1)
46
public
IFilterMetadata
CreateInstance(IServiceProvider serviceProvider)
Microsoft.AspNetCore.Mvc.ViewFeatures.Test (19)
Filters\AntiforgeryApplicationModelProviderTest.cs (2)
63
var
filter = Assert.Single(controller.Filters);
90
var
filter = Assert.Single(controller.Filters);
Filters\AutoValidateAntiforgeryTokenAuthorizationFilterTest.cs (1)
86
var context = new AuthorizationFilterContext(actionContext, new
IFilterMetadata
[]
Filters\ControllerSaveTempDataPropertyFilterFactoryTest.cs (1)
20
var
filter = factory.CreateInstance(CreateServiceProvider());
Filters\ControllerSaveTempDataPropertyFilterTest.cs (4)
45
new List<
IFilterMetadata
>(),
91
new List<
IFilterMetadata
>(),
134
new List<
IFilterMetadata
>(),
173
new List<
IFilterMetadata
>(),
Filters\ControllerViewDataAttributeFilterFactoryTest.cs (1)
22
var
result = filterFactory.CreateInstance(Mock.Of<IServiceProvider>());
Filters\ControllerViewDataAttributeFilterTest.cs (2)
22
var context = new ActionExecutingContext(actionContext, new
IFilterMetadata
[0], new Dictionary<string, object>(), controller);
40
var context = new ActionExecutingContext(actionContext, new
IFilterMetadata
[0], new Dictionary<string, object>(), controller);
Filters\SaveTempDataFilterTest.cs (4)
304
var filters = new
IFilterMetadata
[] { };
322
new
IFilterMetadata
[] { },
335
new
IFilterMetadata
[] { },
352
new
IFilterMetadata
[] { },
Filters\ValidateAntiforgeryTokenAuthorizationFilterTest.cs (1)
62
var context = new AuthorizationFilterContext(actionContext, new
IFilterMetadata
[]
SkipStatusCodePagesAttributeTest.cs (3)
20
var resourceExecutingContext = CreateResourceExecutingContext(new
IFilterMetadata
[] { skipStatusCodeAttribute });
36
var resourceExecutingContext = CreateResourceExecutingContext(new
IFilterMetadata
[] { skipStatusCodeAttribute });
42
private static ResourceExecutingContext CreateResourceExecutingContext(
IFilterMetadata
[] filters)