1 interface inheriting from IActionConstraint
Microsoft.AspNetCore.Mvc.Core (1)
ActionConstraints\IConsumesActionConstraint.cs (1)
10internal interface IConsumesActionConstraint : IActionConstraint
8 implementations of IActionConstraint
BasicWebSite (1)
RequestScopedActionConstraint.cs (1)
31private class Constraint : IActionConstraint
Microsoft.AspNetCore.Mvc.Core (2)
ActionConstraints\ActionMethodSelectorAttribute.cs (1)
14public abstract class ActionMethodSelectorAttribute : Attribute, IActionConstraint
ActionConstraints\HttpMethodActionConstraint.cs (1)
15public class HttpMethodActionConstraint : IActionConstraint
Microsoft.AspNetCore.Mvc.Core.Test (2)
ActionConstraints\ActionConstraintCacheTest.cs (1)
126private class TestActionConstraint : IActionConstraint
Infrastructure\ActionSelectorTest.cs (1)
1143private class BooleanConstraint : IActionConstraint
Microsoft.AspNetCore.Mvc.Test (2)
Routing\ActionConstraintMatcherPolicyTest.cs (2)
500private class ConstraintWithTokens : IActionConstraint 510private class BooleanConstraint : IActionConstraint
VersioningWebSite (1)
VersionRangeValidator.cs (1)
8public class VersionRangeValidator : IActionConstraint
63 references to IActionConstraint
BasicWebSite (2)
RequestScopedActionConstraint.cs (2)
20IActionConstraint IActionConstraintFactory.CreateInstance(IServiceProvider services) 44bool IActionConstraint.Accept(ActionConstraintContext context)
Microsoft.AspNetCore.Mvc.Abstractions (15)
ActionConstraints\ActionConstraintContext.cs (1)
9/// Context for <see cref="IActionConstraint"/> execution.
ActionConstraints\ActionConstraintItem.cs (3)
8/// <see cref="IActionConstraint"/>. 24/// The <see cref="IActionConstraint"/> associated with <see cref="Metadata"/>. 26public IActionConstraint? Constraint { get; set; }
ActionConstraints\ActionSelectorCandidate.cs (4)
18/// The list of <see cref="IActionConstraint"/> instances associated with <paramref name="action"/>. 20public ActionSelectorCandidate(ActionDescriptor action, IReadOnlyList<IActionConstraint>? constraints) 34/// The list of <see cref="IActionConstraint"/> instances associated with <see name="Action"/>. 36public IReadOnlyList<IActionConstraint>? Constraints { get; }
ActionConstraints\IActionConstraint.cs (1)
44/// <see cref="IActionConstraint"/>.
ActionConstraints\IActionConstraintFactory.cs (4)
7/// A factory for <see cref="IActionConstraint"/>. 25/// Creates a new <see cref="IActionConstraint"/>. 28/// <returns>An <see cref="IActionConstraint"/>.</returns> 29IActionConstraint CreateInstance(IServiceProvider services);
ActionConstraints\IActionConstraintMetadata.cs (1)
7/// A marker interface that identifies a type as metadata for an <see cref="IActionConstraint"/>.
ActionConstraints\IActionConstraintProvider.cs (1)
7/// Provider for <see cref="IActionConstraint"/>.
Microsoft.AspNetCore.Mvc.Core (23)
ActionConstraints\ActionConstraintCache.cs (7)
45public IReadOnlyList<IActionConstraint>? GetActionConstraints(HttpContext httpContext, ActionDescriptor action) 93private IReadOnlyList<IActionConstraint>? GetActionConstraintsFromEntry(CacheEntry entry, HttpContext httpContext, ActionDescriptor action) 136private static IReadOnlyList<IActionConstraint>? ExtractActionConstraints(List<ActionConstraintItem> items) 152var actionConstraints = new IActionConstraint[count]; 156var actionConstraint = items[i].Constraint; 183public CacheEntry(IReadOnlyList<IActionConstraint> actionConstraints) 195public IReadOnlyList<IActionConstraint>? ActionConstraints { get; }
ActionConstraints\ActionMethodSelectorAttribute.cs (1)
11/// for a given request. See <see cref="IActionConstraint"/>.
ActionConstraints\DefaultActionConstraintProvider.cs (3)
10/// This provider is able to provide an <see cref="IActionConstraint"/> instance when the 11/// <see cref="IActionConstraintMetadata"/> implements <see cref="IActionConstraint"/> or 43if (item.Metadata is IActionConstraint constraint)
ActionConstraints\HttpMethodActionConstraint.cs (2)
10/// The implementation of <see cref="IActionConstraint" /> used to enforce 18/// The <see cref="IActionConstraint.Order" /> value used by <see cref="HttpMethodActionConstraint" />.
ActionConstraints\IConsumesActionConstraint.cs (1)
7/// An <see cref="IActionConstraint"/> constraint that identifies a type which can be used to select an action
ConsumesAttribute.cs (1)
83int IActionConstraint.Order => ConsumesActionConstraintOrder;
Infrastructure\ActionSelector.cs (4)
33/// providers a set of <see cref="IActionConstraint"/> instances.</param> 161var constraint = candidate.Constraints[j]; 200var constraint = candidate.Constraints[j]; 256public static partial void ConstraintMismatch(ILogger logger, string? actionName, string actionId, IActionConstraint actionConstraint);
Routing\ActionConstraintMatcherPolicy.cs (4)
139IReadOnlyList<IActionConstraint>? constraints = Array.Empty<IActionConstraint>(); 173var constraint = constraints[j]; 212var constraint = constraints[j];
Microsoft.AspNetCore.Mvc.Core.Test (6)
ActionConstraints\ActionConstraintCacheTest.cs (1)
146public IActionConstraint CreateInstance(IServiceProvider serviceProvider)
ActionConstraints\HttpMethodActionConstraintTest.cs (1)
60var actionSelectorCandidate = new ActionSelectorCandidate(new ActionDescriptor(), new List<IActionConstraint> { constraint });
ConsumesAttributeTests.cs (2)
204new ActionSelectorCandidate(actionWithoutConstraint, new List<IActionConstraint>()), 243new ActionSelectorCandidate(actionWithoutConstraint, new List<IActionConstraint>()),
Infrastructure\ActionSelectorTest.cs (2)
1157public IActionConstraint Constraint { get; set; } 1161public IActionConstraint CreateInstance(IServiceProvider services)
Microsoft.AspNetCore.Mvc.Cors.Test (8)
CorsHttpMethodActionConstraintTest.cs (8)
30var constraint = new CorsHttpMethodActionConstraint(new HttpMethodActionConstraint(httpMethods)) as IActionConstraint; 45var constraint = new CorsHttpMethodActionConstraint(new HttpMethodActionConstraint(new[] { "GET", "Post" })) as IActionConstraint; 61var constraint = new CorsHttpMethodActionConstraint(new HttpMethodActionConstraint(httpMethods)) as IActionConstraint; 72private static ActionConstraintContext CreateActionConstraintContext(IActionConstraint constraint) 76var actionSelectorCandidate = new ActionSelectorCandidate(new ActionDescriptor(), new List<IActionConstraint> { constraint });
Microsoft.AspNetCore.Mvc.RazorPages.Test (2)
Infrastructure\PageActionDescriptorProviderTest.cs (2)
172var expected = Mock.Of<IActionConstraint>();
VersioningWebSite (7)
VersionAttribute.cs (1)
34IActionConstraint IActionConstraintFactory.CreateInstance(IServiceProvider services)
VersionRouteAttribute.cs (6)
13private readonly IActionConstraint _actionConstraint; 39var constraint = CreateVersionConstraint(versionRange); 50private static IActionConstraint CreateVersionConstraint(string versionRange) 74private static IActionConstraint GetBoundedRangeVersionConstraint( 100private static IActionConstraint GetSingleVersionOrUnboundedHigherVersionConstraint( 125IActionConstraint IActionConstraintFactory.CreateInstance(IServiceProvider services)