RegexRouteConstraint Class¶
- Namespace
Microsoft.AspNetCore.Routing.Constraints
- Assemblies
- Microsoft.AspNetCore.Routing
Syntax¶
public class RegexRouteConstraint : IRouteConstraint
-
class
Microsoft.AspNetCore.Routing.Constraints.
RegexRouteConstraint
Constructors¶
-
RegexRouteConstraint
(System.String)¶ public RegexRouteConstraint(string regexPattern)
-
RegexRouteConstraint
(System.Text.RegularExpressions.Regex) public RegexRouteConstraint(Regex regex)
-
Properties¶
-
Microsoft.AspNetCore.Routing.Constraints.RegexRouteConstraint.
Constraint
¶ Return type: System.Text.RegularExpressions.Regex public Regex Constraint { get; }
-
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)
-