共用方式為


RoutePatternFactory.Constraint 方法

定義

多載

Constraint(IRouteConstraint)

RoutePatternParameterPolicyReference從提供的條件約束建立 。

Constraint(Object)

RoutePatternParameterPolicyReference從提供的限制建立 。

Constraint(String)

RoutePatternParameterPolicyReference從提供的條件約束建立 。

Constraint(IRouteConstraint)

來源:
RoutePatternFactory.cs
來源:
RoutePatternFactory.cs

RoutePatternParameterPolicyReference從提供的條件約束建立 。

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

參數

constraint
IRouteConstraint

條件約束物件。

傳回

RoutePatternParameterPolicyReference

適用於

Constraint(Object)

來源:
RoutePatternFactory.cs
來源:
RoutePatternFactory.cs

RoutePatternParameterPolicyReference從提供的限制建立 。

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

參數

constraint
Object

條件約束物件,其類型必須是 IRouteConstraintString 。 如果條件約束物件是 String ,則會轉換成 的 RegexRouteConstraint 實例。

傳回

RoutePatternParameterPolicyReference

適用於

Constraint(String)

來源:
RoutePatternFactory.cs
來源:
RoutePatternFactory.cs

RoutePatternParameterPolicyReference從提供的條件約束建立 。

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

參數

constraint
String

條件約束文字,由 解析。 ParameterPolicyFactory

傳回

RoutePatternParameterPolicyReference

適用於