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

定义

尝试使用匹配 addressEndpoint指定的路由模式分析提供的 path

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

适用于