共用方式為


HttpMethodConstraint.IRouteConstraint.Match 方法

定義

 virtual bool System.Web.Routing.IRouteConstraint.Match(System::Web::HttpContextBase ^ httpContext, System::Web::Routing::Route ^ route, System::String ^ parameterName, System::Web::Routing::RouteValueDictionary ^ values, System::Web::Routing::RouteDirection routeDirection) = System::Web::Routing::IRouteConstraint::Match;
bool IRouteConstraint.Match (System.Web.HttpContextBase httpContext, System.Web.Routing.Route route, string parameterName, System.Web.Routing.RouteValueDictionary values, System.Web.Routing.RouteDirection routeDirection);
abstract member System.Web.Routing.IRouteConstraint.Match : System.Web.HttpContextBase * System.Web.Routing.Route * string * System.Web.Routing.RouteValueDictionary * System.Web.Routing.RouteDirection -> bool
override this.System.Web.Routing.IRouteConstraint.Match : System.Web.HttpContextBase * System.Web.Routing.Route * string * System.Web.Routing.RouteValueDictionary * System.Web.Routing.RouteDirection -> bool
Function Match (httpContext As HttpContextBase, route As Route, parameterName As String, values As RouteValueDictionary, routeDirection As RouteDirection) As Boolean Implements IRouteConstraint.Match

參數

httpContext
HttpContextBase

封裝 HTTP 要求相關資訊的物件。

route
Route

正在檢查物件以判斷它是否符合 URL。

parameterName
String

正在檢查的參數名稱。

values
RouteValueDictionary

包含路徑參數的物件。

routeDirection
RouteDirection

處理傳入要求或產生 URL物件時,指出是否正在執行條件約束檢查的物件。

傳回

如果使用允許的 HTTP 動詞命令提出要求,則為 true;否則為 false。 預設為 true

實作

例外狀況

下列參數有一個或多個是 nullhttpContextrouteparameterNamevalues

備註

這個成員是明確介面成員實作, 只有在 HttpMethodConstraint 執行個體轉換成 IRouteConstraint 介面時,才能使用這個成員。

適用於

另請參閱