共用方式為


LinkParser.ParsePathByAddress<TAddress>(TAddress, PathString) 方法

定義

嘗試使用相符 address 的 所指定的路由模式剖析提供的 。 pathEndpoint

public:
generic <typename TAddress>
 abstract Microsoft::AspNetCore::Routing::RouteValueDictionary ^ ParsePathByAddress(TAddress address, Microsoft::AspNetCore::Http::PathString path);
public abstract Microsoft.AspNetCore.Routing.RouteValueDictionary ParsePathByAddress<TAddress> (TAddress address, Microsoft.AspNetCore.Http.PathString path);
public abstract Microsoft.AspNetCore.Routing.RouteValueDictionary? ParsePathByAddress<TAddress> (TAddress address, Microsoft.AspNetCore.Http.PathString path);
abstract member ParsePathByAddress : 'Address * Microsoft.AspNetCore.Http.PathString -> Microsoft.AspNetCore.Routing.RouteValueDictionary
Public MustOverride Function ParsePathByAddress(Of TAddress) (address As TAddress, path As PathString) As RouteValueDictionary

類型參數

TAddress

網址類別型。

參數

address
TAddress

位址值。 用來解析端點。

path
PathString

要剖析的 URI 路徑。

傳回

RouteValueDictionary如果剖析成功,則為具有剖析值的 ,否則 null 為 。

備註

ParsePathByAddress<TAddress>(TAddress, PathString) 會嘗試先解析 Endpoint 符合 address 的實例,然後使用與每個端點相關聯的路由模式來剖析 URL 路徑。

剖析作業將會失敗,如果找不到任何端點,或沒有任何路由模式符合提供的 URI 路徑,則會傳回 null

適用於