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