MinRouteConstraint Class

Constrains a route parameter to be a long with a minimum value.

Namespace
Microsoft.AspNetCore.Routing.Constraints
Assemblies
  • Microsoft.AspNetCore.Routing

Syntax

public class MinRouteConstraint : IRouteConstraint
class Microsoft.AspNetCore.Routing.Constraints.MinRouteConstraint

Constructors

MinRouteConstraint(System.Int64)

Initializes a new instance of the Microsoft.AspNetCore.Routing.Constraints.MinRouteConstraint class.

Arguments:min (System.Int64) – The minimum value allowed for the route parameter.
public MinRouteConstraint(long min)

Methods

Match(Microsoft.AspNetCore.Http.HttpContext, Microsoft.AspNetCore.Routing.IRouter, System.String, Microsoft.AspNetCore.Routing.RouteValueDictionary, Microsoft.AspNetCore.Routing.RouteDirection)
Return type:System.Boolean
public bool Match(HttpContext httpContext, IRouter route, string routeKey, RouteValueDictionary values, RouteDirection routeDirection)

Properties

Microsoft.AspNetCore.Routing.Constraints.MinRouteConstraint.Min

Gets the minimum allowed value of the route parameter.

Return type:System.Int64
public long Min { get; }