共用方式為


TemplateBinder.TryProcessConstraints 方法

定義

如果條件約束已傳入 TemplateBinder 建構函式,則會處理條件約束。

public:
 bool TryProcessConstraints(Microsoft::AspNetCore::Http::HttpContext ^ httpContext, Microsoft::AspNetCore::Routing::RouteValueDictionary ^ combinedValues, [Runtime::InteropServices::Out] System::String ^ % parameterName, [Runtime::InteropServices::Out] Microsoft::AspNetCore::Routing::IRouteConstraint ^ % constraint);
public bool TryProcessConstraints (Microsoft.AspNetCore.Http.HttpContext httpContext, Microsoft.AspNetCore.Routing.RouteValueDictionary combinedValues, out string parameterName, out Microsoft.AspNetCore.Routing.IRouteConstraint constraint);
public bool TryProcessConstraints (Microsoft.AspNetCore.Http.HttpContext? httpContext, Microsoft.AspNetCore.Routing.RouteValueDictionary combinedValues, out string? parameterName, out Microsoft.AspNetCore.Routing.IRouteConstraint? constraint);
member this.TryProcessConstraints : Microsoft.AspNetCore.Http.HttpContext * Microsoft.AspNetCore.Routing.RouteValueDictionary * string * IRouteConstraint -> bool
Public Function TryProcessConstraints (httpContext As HttpContext, combinedValues As RouteValueDictionary, ByRef parameterName As String, ByRef constraint As IRouteConstraint) As Boolean

參數

httpContext
HttpContext

HttpContext與目前要求相關聯的 。

combinedValues
RouteValueDictionary

包含路由參數的字典。

parameterName
String

參數名稱。

constraint
IRouteConstraint

條件約束物件。

傳回

true 如果條件約束已順利處理,則為 false,否則為 false。

適用於