ActionMethodSelectorAttribute Class¶
Summary¶
Base class for attributes which can implement conditional logic to enable or disable an action for a given request. See [Microsoft.AspNet.Mvc.IActionConstraint]().
Inheritance Hierarchy¶
System.Object
System.Attribute
Microsoft.AspNet.Mvc.ActionMethodSelectorAttribute
Syntax¶
public abstract class ActionMethodSelectorAttribute : Attribute, _Attribute, IActionConstraint, IActionConstraintMetadata
Properties¶
-
Order
()¶ Return type: System.Int32 public int Order { get; set; }
-
Methods¶
-
Accept
(Microsoft.AspNet.Mvc.ActionConstraintContext)¶ Arguments: - context (Microsoft.AspNet.Mvc.ActionConstraintContext) –
Return type: System.Boolean
public bool Accept(ActionConstraintContext context)
-
IsValidForRequest
(RouteContext, Microsoft.AspNet.Mvc.ActionDescriptor)¶ Determines whether the action selection is valid for the specified route context.
Arguments: - routeContext (RouteContext) – The route context.
- action (Microsoft.AspNet.Mvc.ActionDescriptor) – Information about the action.
Return type: System.Boolean
Returns: <see langword=”true” /> if the action selection is valid for the specified context; otherwise, <see langword=”false” />.
public abstract bool IsValidForRequest(RouteContext routeContext, ActionDescriptor action)
-