Partilhar via


LinkGenerator.GetPathByAddress Método

Definição

Sobrecargas

GetPathByAddress<TAddress>(TAddress, RouteValueDictionary, PathString, FragmentString, LinkOptions)

Gera um URI com um caminho absoluto com base nos valores fornecidos.

GetPathByAddress<TAddress>(HttpContext, TAddress, RouteValueDictionary, RouteValueDictionary, Nullable<PathString>, FragmentString, LinkOptions)

Gera um URI com um caminho absoluto com base nos valores fornecidos e HttpContext.

GetPathByAddress<TAddress>(TAddress, RouteValueDictionary, PathString, FragmentString, LinkOptions)

Origem:
LinkGenerator.cs

Gera um URI com um caminho absoluto com base nos valores fornecidos.

public abstract string GetPathByAddress<TAddress> (TAddress address, Microsoft.AspNetCore.Routing.RouteValueDictionary values, Microsoft.AspNetCore.Http.PathString pathBase = default, Microsoft.AspNetCore.Http.FragmentString fragment = default, Microsoft.AspNetCore.Routing.LinkOptions options = default);
public abstract string? GetPathByAddress<TAddress> (TAddress address, Microsoft.AspNetCore.Routing.RouteValueDictionary values, Microsoft.AspNetCore.Http.PathString pathBase = default, Microsoft.AspNetCore.Http.FragmentString fragment = default, Microsoft.AspNetCore.Routing.LinkOptions? options = default);
abstract member GetPathByAddress : 'Address * Microsoft.AspNetCore.Routing.RouteValueDictionary * Microsoft.AspNetCore.Http.PathString * Microsoft.AspNetCore.Http.FragmentString * Microsoft.AspNetCore.Routing.LinkOptions -> string
Public MustOverride Function GetPathByAddress(Of TAddress) (address As TAddress, values As RouteValueDictionary, Optional pathBase As PathString = Nothing, Optional fragment As FragmentString = Nothing, Optional options As LinkOptions = Nothing) As String

Parâmetros de tipo

TAddress

O tipo de endereço.

Parâmetros

address
TAddress

O valor do endereço. Usado para resolve pontos de extremidade.

values
RouteValueDictionary

Os valores de rota. Usado para expandir parâmetros no modelo de rota.

pathBase
PathString

Uma base de caminho de URI opcional. Anexado ao caminho no URI resultante.

fragment
FragmentString

Um fragmento de URI opcional. Acrescentado ao URI resultante.

options
LinkOptions

Um LinkOptions opcional. As configurações no objeto fornecido substituem as configurações com nomes correspondentes de RouteOptions.

Retornos

Um URI com um caminho absoluto ou null.

Aplica-se a

GetPathByAddress<TAddress>(HttpContext, TAddress, RouteValueDictionary, RouteValueDictionary, Nullable<PathString>, FragmentString, LinkOptions)

Origem:
LinkGenerator.cs

Gera um URI com um caminho absoluto com base nos valores fornecidos e HttpContext.

public abstract string GetPathByAddress<TAddress> (Microsoft.AspNetCore.Http.HttpContext httpContext, TAddress address, Microsoft.AspNetCore.Routing.RouteValueDictionary values, Microsoft.AspNetCore.Routing.RouteValueDictionary ambientValues = default, Microsoft.AspNetCore.Http.PathString? pathBase = default, Microsoft.AspNetCore.Http.FragmentString fragment = default, Microsoft.AspNetCore.Routing.LinkOptions options = default);
public abstract string? GetPathByAddress<TAddress> (Microsoft.AspNetCore.Http.HttpContext httpContext, TAddress address, Microsoft.AspNetCore.Routing.RouteValueDictionary values, Microsoft.AspNetCore.Routing.RouteValueDictionary? ambientValues = default, Microsoft.AspNetCore.Http.PathString? pathBase = default, Microsoft.AspNetCore.Http.FragmentString fragment = default, Microsoft.AspNetCore.Routing.LinkOptions? options = default);
abstract member GetPathByAddress : Microsoft.AspNetCore.Http.HttpContext * 'Address * Microsoft.AspNetCore.Routing.RouteValueDictionary * Microsoft.AspNetCore.Routing.RouteValueDictionary * Nullable<Microsoft.AspNetCore.Http.PathString> * Microsoft.AspNetCore.Http.FragmentString * Microsoft.AspNetCore.Routing.LinkOptions -> string
Public MustOverride Function GetPathByAddress(Of TAddress) (httpContext As HttpContext, address As TAddress, values As RouteValueDictionary, Optional ambientValues As RouteValueDictionary = Nothing, Optional pathBase As Nullable(Of PathString) = Nothing, Optional fragment As FragmentString = Nothing, Optional options As LinkOptions = Nothing) As String

Parâmetros de tipo

TAddress

O tipo de endereço.

Parâmetros

httpContext
HttpContext

O HttpContext associado à solicitação atual.

address
TAddress

O valor do endereço. Usado para resolve pontos de extremidade.

values
RouteValueDictionary

Os valores de rota. Usado para expandir parâmetros no modelo de rota.

ambientValues
RouteValueDictionary

Os valores associados à solicitação atual. Opcional.

pathBase
Nullable<PathString>

Uma base de caminho de URI opcional. Anexado ao caminho no URI resultante. Se não for fornecido, o valor de PathBase será usado.

fragment
FragmentString

Um fragmento de URI opcional. Acrescentado ao URI resultante.

options
LinkOptions

Um LinkOptions opcional. As configurações no objeto fornecido substituem as configurações com nomes correspondentes de RouteOptions.

Retornos

Um URI com um caminho absoluto ou null.

Aplica-se a