IActionConstraint Interface¶
Supports conditional logic to determine whether or not an associated action is valid to be selected for the given request.
- Namespace
Microsoft.AspNetCore.Mvc.ActionConstraints
- Assemblies
- Microsoft.AspNetCore.Mvc.Abstractions
Syntax¶
public interface IActionConstraint : IActionConstraintMetadata
-
interface
Microsoft.AspNetCore.Mvc.ActionConstraints.
IActionConstraint
Methods¶
-
Accept
(Microsoft.AspNetCore.Mvc.ActionConstraints.ActionConstraintContext)¶ Determines whether an action is a valid candidate for selection.
Arguments: context (Microsoft.AspNetCore.Mvc.ActionConstraints.ActionConstraintContext) – The Microsoft.AspNetCore.Mvc.ActionConstraints.ActionConstraintContext
.Return type: System.Boolean Returns: True if the action is valid for selection, otherwise false. bool Accept(ActionConstraintContext context)
-
Properties¶
-
Microsoft.AspNetCore.Mvc.ActionConstraints.IActionConstraint.
Order
¶ The constraint order.
Return type: System.Int32 int Order { get; }
-