Share via


OptionalRouteConstraint Class

Definition

Defines a constraint on an optional parameter. If the parameter is present, then it is constrained by InnerConstraint.

public ref class OptionalRouteConstraint : Microsoft::AspNetCore::Routing::IRouteConstraint
public class OptionalRouteConstraint : Microsoft.AspNetCore.Routing.IRouteConstraint
type OptionalRouteConstraint = class
    interface IRouteConstraint
type OptionalRouteConstraint = class
    interface IRouteConstraint
    interface IParameterPolicy
type OptionalRouteConstraint = class
    interface IParameterPolicy
    interface IRouteConstraint
Public Class OptionalRouteConstraint
Implements IRouteConstraint
Inheritance
OptionalRouteConstraint
Implements

Constructors

OptionalRouteConstraint(IRouteConstraint)

Creates a new OptionalRouteConstraint instance given the innerConstraint.

Properties

InnerConstraint

Gets the IRouteConstraint associated with the optional parameter.

Methods

Match(HttpContext, IRouter, String, RouteValueDictionary, RouteDirection)

Determines whether the URL parameter contains a valid value for this constraint.

Applies to