Share via


RoutePatternFactory.Constraint Method

Definition

Overloads

Constraint(IRouteConstraint)

Creates a RoutePatternParameterPolicyReference from the provided constraint.

Constraint(Object)

Creates a RoutePatternParameterPolicyReference from the provided contraint.

Constraint(String)

Creates a RoutePatternParameterPolicyReference from the provided constraint.

Constraint(IRouteConstraint)

Source:
RoutePatternFactory.cs
Source:
RoutePatternFactory.cs

Creates a RoutePatternParameterPolicyReference from the provided constraint.

public:
 static Microsoft::AspNetCore::Routing::Patterns::RoutePatternParameterPolicyReference ^ Constraint(Microsoft::AspNetCore::Routing::IRouteConstraint ^ constraint);
public static Microsoft.AspNetCore.Routing.Patterns.RoutePatternParameterPolicyReference Constraint (Microsoft.AspNetCore.Routing.IRouteConstraint constraint);
static member Constraint : Microsoft.AspNetCore.Routing.IRouteConstraint -> Microsoft.AspNetCore.Routing.Patterns.RoutePatternParameterPolicyReference
Public Shared Function Constraint (constraint As IRouteConstraint) As RoutePatternParameterPolicyReference

Parameters

constraint
IRouteConstraint

The constraint object.

Returns

The RoutePatternParameterPolicyReference.

Applies to

Constraint(Object)

Source:
RoutePatternFactory.cs
Source:
RoutePatternFactory.cs

Creates a RoutePatternParameterPolicyReference from the provided contraint.

public:
 static Microsoft::AspNetCore::Routing::Patterns::RoutePatternParameterPolicyReference ^ Constraint(System::Object ^ constraint);
public static Microsoft.AspNetCore.Routing.Patterns.RoutePatternParameterPolicyReference Constraint (object constraint);
static member Constraint : obj -> Microsoft.AspNetCore.Routing.Patterns.RoutePatternParameterPolicyReference
Public Shared Function Constraint (constraint As Object) As RoutePatternParameterPolicyReference

Parameters

constraint
Object

The constraint object, which must be of type IRouteConstraint or String. If the constraint object is a String then it will be transformed into an instance of RegexRouteConstraint.

Returns

The RoutePatternParameterPolicyReference.

Applies to

Constraint(String)

Source:
RoutePatternFactory.cs
Source:
RoutePatternFactory.cs

Creates a RoutePatternParameterPolicyReference from the provided constraint.

public:
 static Microsoft::AspNetCore::Routing::Patterns::RoutePatternParameterPolicyReference ^ Constraint(System::String ^ constraint);
public static Microsoft.AspNetCore.Routing.Patterns.RoutePatternParameterPolicyReference Constraint (string constraint);
static member Constraint : string -> Microsoft.AspNetCore.Routing.Patterns.RoutePatternParameterPolicyReference
Public Shared Function Constraint (constraint As String) As RoutePatternParameterPolicyReference

Parameters

constraint
String

The constraint text, which will be resolved by ParameterPolicyFactory.

Returns

The RoutePatternParameterPolicyReference.

Applies to