LinkParserEndpointNameAddressExtensions.ParsePathByEndpointName 方法

定義

嘗試使用比 endpointName 對 所指定的路由模式剖析所提供的 。 pathEndpoint

public:
[System::Runtime::CompilerServices::Extension]
 static Microsoft::AspNetCore::Routing::RouteValueDictionary ^ ParsePathByEndpointName(Microsoft::AspNetCore::Routing::LinkParser ^ parser, System::String ^ endpointName, Microsoft::AspNetCore::Http::PathString path);
public static Microsoft.AspNetCore.Routing.RouteValueDictionary ParsePathByEndpointName (this Microsoft.AspNetCore.Routing.LinkParser parser, string endpointName, Microsoft.AspNetCore.Http.PathString path);
public static Microsoft.AspNetCore.Routing.RouteValueDictionary? ParsePathByEndpointName (this Microsoft.AspNetCore.Routing.LinkParser parser, string endpointName, Microsoft.AspNetCore.Http.PathString path);
static member ParsePathByEndpointName : Microsoft.AspNetCore.Routing.LinkParser * string * Microsoft.AspNetCore.Http.PathString -> Microsoft.AspNetCore.Routing.RouteValueDictionary
<Extension()>
Public Function ParsePathByEndpointName (parser As LinkParser, endpointName As String, path As PathString) As RouteValueDictionary

參數

endpointName
String

端點名稱。 用來解析端點。

path
PathString

要剖析的 URI 路徑。

傳回

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

備註

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

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

適用於