共用方式為


TemplateMatcher.TryMatch(PathString, RouteValueDictionary) 方法

定義

評估提供的 pathTemplate 是否符合 。 填入 values 參數值。

public:
 bool TryMatch(Microsoft::AspNetCore::Http::PathString path, Microsoft::AspNetCore::Routing::RouteValueDictionary ^ values);
public bool TryMatch (Microsoft.AspNetCore.Http.PathString path, Microsoft.AspNetCore.Routing.RouteValueDictionary values);
member this.TryMatch : Microsoft.AspNetCore.Http.PathString * Microsoft.AspNetCore.Routing.RouteValueDictionary -> bool
Public Function TryMatch (path As PathString, values As RouteValueDictionary) As Boolean

參數

path
PathString

PathString 表示要比對的路由。

values
RouteValueDictionary

RouteValueDictionary 填入參數值的 。

傳回

true 如果 符合 ,則 pathTemplate

適用於