Sdílet prostřednictvím


LengthRouteConstraint Třída

Definice

Omezuje parametr trasy tak, aby byl řetězec dané délky nebo v daném rozsahu délek.

public ref class LengthRouteConstraint : Microsoft::AspNetCore::Routing::IRouteConstraint
public class LengthRouteConstraint : Microsoft.AspNetCore.Routing.IRouteConstraint
public class LengthRouteConstraint : Microsoft.AspNetCore.Routing.IRouteConstraint, Microsoft.AspNetCore.Routing.Matching.IParameterLiteralNodeMatchingPolicy
type LengthRouteConstraint = class
    interface IRouteConstraint
type LengthRouteConstraint = class
    interface IRouteConstraint
    interface IParameterPolicy
type LengthRouteConstraint = class
    interface IParameterPolicy
    interface IRouteConstraint
type LengthRouteConstraint = class
    interface IRouteConstraint
    interface IParameterPolicy
    interface IParameterLiteralNodeMatchingPolicy
Public Class LengthRouteConstraint
Implements IRouteConstraint
Public Class LengthRouteConstraint
Implements IParameterLiteralNodeMatchingPolicy, IRouteConstraint
Dědičnost
LengthRouteConstraint
Implementuje

Konstruktory

LengthRouteConstraint(Int32)

Inicializuje novou instanci LengthRouteConstraint třídy, která omezuje parametr trasy na řetězec dané délky.

LengthRouteConstraint(Int32, Int32)

Inicializuje novou instanci LengthRouteConstraint třídy, která omezuje parametr trasy na řetězec dané délky.

Vlastnosti

MaxLength

Získá maximální délku povolenou pro parametr trasy.

MinLength

Získá minimální délku povolenou pro parametr trasy.

Metody

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

Určuje, zda parametr adresy URL obsahuje platnou hodnotu pro toto omezení.

Explicitní implementace rozhraní

IParameterLiteralNodeMatchingPolicy.MatchesLiteral(String, String)

Omezuje parametr trasy tak, aby byl řetězec dané délky nebo v daném rozsahu délek.

Platí pro