Partilhar via


RoutingHttpContextExtensions.GetRouteValue(HttpContext, String) Método

Definição

Obtém um valor de rota de Values associado ao fornecido httpContext.

public:
[System::Runtime::CompilerServices::Extension]
 static System::Object ^ GetRouteValue(Microsoft::AspNetCore::Http::HttpContext ^ httpContext, System::String ^ key);
public static object GetRouteValue (this Microsoft.AspNetCore.Http.HttpContext httpContext, string key);
public static object? GetRouteValue (this Microsoft.AspNetCore.Http.HttpContext httpContext, string key);
static member GetRouteValue : Microsoft.AspNetCore.Http.HttpContext * string -> obj
<Extension()>
Public Function GetRouteValue (httpContext As HttpContext, key As String) As Object

Parâmetros

httpContext
HttpContext

O HttpContext associado à solicitação atual.

key
String

A chave do valor da rota.

Retornos

O valor de rota correspondente ou nulo.

Aplica-se a