CompositeRouteConstraint Class

Constrains a route by several child constraints.

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

Syntax

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

Constructors

CompositeRouteConstraint(System.Collections.Generic.IEnumerable<Microsoft.AspNetCore.Routing.IRouteConstraint>)

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

Arguments:constraints (System.Collections.Generic.IEnumerable<Microsoft.AspNetCore.Routing.IRouteConstraint>) – The child constraints that must match for this constraint to match.
public CompositeRouteConstraint(IEnumerable<IRouteConstraint> constraints)

Properties

Microsoft.AspNetCore.Routing.Constraints.CompositeRouteConstraint.Constraints

Gets the child constraints that must match for this constraint to match.

Return type:System.Collections.Generic.IEnumerable<Microsoft.AspNetCore.Routing.IRouteConstraint>
public IEnumerable<IRouteConstraint> Constraints { 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)