RouteConstraintBuilder Class

Definition

A builder for produding a mapping of keys to see IRouteConstraint.

C#
public class RouteConstraintBuilder
Inheritance
RouteConstraintBuilder

Remarks

RouteConstraintBuilder allows iterative building a set of route constraints, and will merge multiple entries for the same key.

Constructors

Methods

AddConstraint(String, Object)

Adds a constraint instance for the given key.

AddResolvedConstraint(String, String)

Adds a constraint for the given key, resolved by the IInlineConstraintResolver.

Build()

Builds a mapping of constraints.

SetOptional(String)

Sets the given key as optional.

Applies to

Produk Versi
ASP.NET Core 1.0, 1.1, 2.0, 2.1, 2.2, 3.0, 3.1, 5.0, 6.0, 7.0, 8.0, 9.0