Share via


LinkGeneratorRouteValuesAddressExtensions.GetPathByRouteValues 方法

定義

多載

GetPathByRouteValues(LinkGenerator, String, RouteValueDictionary, PathString, FragmentString, LinkOptions)

根據提供的值產生具有絕對路徑的 URI。

GetPathByRouteValues(LinkGenerator, String, Object, PathString, FragmentString, LinkOptions)

根據提供的值產生具有絕對路徑的 URI。

GetPathByRouteValues(LinkGenerator, HttpContext, String, RouteValueDictionary, Nullable<PathString>, FragmentString, LinkOptions)

根據提供的值產生具有絕對路徑的 URI。

GetPathByRouteValues(LinkGenerator, HttpContext, String, Object, Nullable<PathString>, FragmentString, LinkOptions)

根據提供的值產生具有絕對路徑的 URI。

GetPathByRouteValues(LinkGenerator, String, RouteValueDictionary, PathString, FragmentString, LinkOptions)

根據提供的值產生具有絕對路徑的 URI。

public static string? GetPathByRouteValues (this Microsoft.AspNetCore.Routing.LinkGenerator generator, string? routeName, Microsoft.AspNetCore.Routing.RouteValueDictionary? values = default, Microsoft.AspNetCore.Http.PathString pathBase = default, Microsoft.AspNetCore.Http.FragmentString fragment = default, Microsoft.AspNetCore.Routing.LinkOptions? options = default);
static member GetPathByRouteValues : Microsoft.AspNetCore.Routing.LinkGenerator * string * Microsoft.AspNetCore.Routing.RouteValueDictionary * Microsoft.AspNetCore.Http.PathString * Microsoft.AspNetCore.Http.FragmentString * Microsoft.AspNetCore.Routing.LinkOptions -> string
<Extension()>
Public Function GetPathByRouteValues (generator As LinkGenerator, routeName As String, Optional values As RouteValueDictionary = Nothing, Optional pathBase As PathString = Nothing, Optional fragment As FragmentString = Nothing, Optional options As LinkOptions = Nothing) As String

參數

routeName
String

路由名稱。 用來解析端點。 選擇性。

values
RouteValueDictionary

路徑值。 用來解析端點,並展開路由範本中的參數。 選擇性。

pathBase
PathString

選擇性 URI 路徑基底。 在產生的 URI 中,前面加上路徑。

fragment
FragmentString

選擇性 URI 片段。 附加至產生的 URI。

options
LinkOptions

選擇性 LinkOptions。 所提供物件的設定會覆寫具有相符名稱的 RouteOptions 設定。

傳回

具有絕對路徑的 URI,或 null

適用於

GetPathByRouteValues(LinkGenerator, String, Object, PathString, FragmentString, LinkOptions)

來源:
LinkGeneratorRouteValuesAddressExtensions.cs

根據提供的值產生具有絕對路徑的 URI。

public static string GetPathByRouteValues (this Microsoft.AspNetCore.Routing.LinkGenerator generator, string routeName, object values, Microsoft.AspNetCore.Http.PathString pathBase = default, Microsoft.AspNetCore.Http.FragmentString fragment = default, Microsoft.AspNetCore.Routing.LinkOptions options = default);
public static string? GetPathByRouteValues (this Microsoft.AspNetCore.Routing.LinkGenerator generator, string? routeName, object? values, Microsoft.AspNetCore.Http.PathString pathBase = default, Microsoft.AspNetCore.Http.FragmentString fragment = default, Microsoft.AspNetCore.Routing.LinkOptions? options = default);
static member GetPathByRouteValues : Microsoft.AspNetCore.Routing.LinkGenerator * string * obj * Microsoft.AspNetCore.Http.PathString * Microsoft.AspNetCore.Http.FragmentString * Microsoft.AspNetCore.Routing.LinkOptions -> string
<Extension()>
Public Function GetPathByRouteValues (generator As LinkGenerator, routeName As String, values As Object, Optional pathBase As PathString = Nothing, Optional fragment As FragmentString = Nothing, Optional options As LinkOptions = Nothing) As String

參數

routeName
String

路由名稱。 用來解析端點。 選擇性。

values
Object

路徑值。 用來解析端點,並展開路由範本中的參數。 選擇性。

pathBase
PathString

選擇性 URI 路徑基底。 在產生的 URI 中,前面加上路徑。

fragment
FragmentString

選擇性 URI 片段。 附加至產生的 URI。

options
LinkOptions

選擇性 LinkOptions。 所提供物件的設定會覆寫具有相符名稱的 RouteOptions 設定。

傳回

具有絕對路徑的 URI,或 null

適用於

GetPathByRouteValues(LinkGenerator, HttpContext, String, RouteValueDictionary, Nullable<PathString>, FragmentString, LinkOptions)

根據提供的值產生具有絕對路徑的 URI。

public static string? GetPathByRouteValues (this Microsoft.AspNetCore.Routing.LinkGenerator generator, Microsoft.AspNetCore.Http.HttpContext httpContext, string? routeName, Microsoft.AspNetCore.Routing.RouteValueDictionary? values = default, Microsoft.AspNetCore.Http.PathString? pathBase = default, Microsoft.AspNetCore.Http.FragmentString fragment = default, Microsoft.AspNetCore.Routing.LinkOptions? options = default);
static member GetPathByRouteValues : Microsoft.AspNetCore.Routing.LinkGenerator * Microsoft.AspNetCore.Http.HttpContext * string * Microsoft.AspNetCore.Routing.RouteValueDictionary * Nullable<Microsoft.AspNetCore.Http.PathString> * Microsoft.AspNetCore.Http.FragmentString * Microsoft.AspNetCore.Routing.LinkOptions -> string
<Extension()>
Public Function GetPathByRouteValues (generator As LinkGenerator, httpContext As HttpContext, routeName As String, Optional values As RouteValueDictionary = Nothing, Optional pathBase As Nullable(Of PathString) = Nothing, Optional fragment As FragmentString = Nothing, Optional options As LinkOptions = Nothing) As String

參數

httpContext
HttpContext

HttpContext 目前要求相關聯的 。

routeName
String

路由名稱。 用來解析端點。 選擇性。

values
RouteValueDictionary

路徑值。 用來解析端點,並展開路由範本中的參數。 選擇性。

pathBase
Nullable<PathString>

選擇性 URI 路徑基底。 在產生的 URI 中,前面加上路徑。 如果未提供,則會使用 的值 PathBase

fragment
FragmentString

選擇性 URI 片段。 附加至產生的 URI。

options
LinkOptions

選擇性 LinkOptions。 所提供物件的設定會覆寫具有相符名稱的 RouteOptions 設定。

傳回

具有絕對路徑的 URI,或 null

適用於

GetPathByRouteValues(LinkGenerator, HttpContext, String, Object, Nullable<PathString>, FragmentString, LinkOptions)

來源:
LinkGeneratorRouteValuesAddressExtensions.cs

根據提供的值產生具有絕對路徑的 URI。

public static string GetPathByRouteValues (this Microsoft.AspNetCore.Routing.LinkGenerator generator, Microsoft.AspNetCore.Http.HttpContext httpContext, string routeName, object values, Microsoft.AspNetCore.Http.PathString? pathBase = default, Microsoft.AspNetCore.Http.FragmentString fragment = default, Microsoft.AspNetCore.Routing.LinkOptions options = default);
public static string? GetPathByRouteValues (this Microsoft.AspNetCore.Routing.LinkGenerator generator, Microsoft.AspNetCore.Http.HttpContext httpContext, string? routeName, object? values, Microsoft.AspNetCore.Http.PathString? pathBase = default, Microsoft.AspNetCore.Http.FragmentString fragment = default, Microsoft.AspNetCore.Routing.LinkOptions? options = default);
static member GetPathByRouteValues : Microsoft.AspNetCore.Routing.LinkGenerator * Microsoft.AspNetCore.Http.HttpContext * string * obj * Nullable<Microsoft.AspNetCore.Http.PathString> * Microsoft.AspNetCore.Http.FragmentString * Microsoft.AspNetCore.Routing.LinkOptions -> string
<Extension()>
Public Function GetPathByRouteValues (generator As LinkGenerator, httpContext As HttpContext, routeName As String, values As Object, Optional pathBase As Nullable(Of PathString) = Nothing, Optional fragment As FragmentString = Nothing, Optional options As LinkOptions = Nothing) As String

參數

httpContext
HttpContext

HttpContext 目前要求相關聯的 。

routeName
String

路由名稱。 用來解析端點。 選擇性。

values
Object

路徑值。 用來解析端點,並展開路由範本中的參數。 選擇性。

pathBase
Nullable<PathString>

選擇性 URI 路徑基底。 在產生的 URI 中,前面加上路徑。 如果未提供,則會使用 的值 PathBase

fragment
FragmentString

選擇性 URI 片段。 附加至產生的 URI。

options
LinkOptions

選擇性 LinkOptions。 所提供物件的設定會覆寫具有相符名稱的 RouteOptions 設定。

傳回

具有絕對路徑的 URI,或 null

適用於