Compartir a través de


RouteHandlerServices.Map Método

Definición

Sobrecargas

Map(IEndpointRouteBuilder, String, Delegate, IEnumerable<String>, Func<MethodInfo,RequestDelegateFactoryOptions,RequestDelegateMetadataResult>, Func<Delegate,RequestDelegateFactoryOptions,RequestDelegateMetadataResult, RequestDelegateResult>)

Registra un punto de conexión con funciones personalizadas para construir un delegado de solicitud para su controlador y rellenar metadatos para el punto de conexión. Destinado al consumo en RequestDelegateGenerator.

Map(IEndpointRouteBuilder, String, Delegate, IEnumerable<String>, Func<MethodInfo,RequestDelegateFactoryOptions,RequestDelegateMetadataResult>, Func<Delegate,RequestDelegateFactoryOptions,RequestDelegateMetadataResult, RequestDelegateResult>, MethodInfo)

Registra un punto de conexión con funciones personalizadas para construir un delegado de solicitud para su controlador y rellenar metadatos para el punto de conexión. Destinado al consumo en RequestDelegateGenerator.

Map(IEndpointRouteBuilder, String, Delegate, IEnumerable<String>, Func<MethodInfo,RequestDelegateFactoryOptions,RequestDelegateMetadataResult>, Func<Delegate,RequestDelegateFactoryOptions,RequestDelegateMetadataResult, RequestDelegateResult>)

Source:
RouteHandlerServices.cs

Registra un punto de conexión con funciones personalizadas para construir un delegado de solicitud para su controlador y rellenar metadatos para el punto de conexión. Destinado al consumo en RequestDelegateGenerator.

public static Microsoft.AspNetCore.Builder.RouteHandlerBuilder Map (Microsoft.AspNetCore.Routing.IEndpointRouteBuilder endpoints, string pattern, Delegate handler, System.Collections.Generic.IEnumerable<string>? httpMethods, Func<System.Reflection.MethodInfo,Microsoft.AspNetCore.Http.RequestDelegateFactoryOptions?,Microsoft.AspNetCore.Http.RequestDelegateMetadataResult> populateMetadata, Func<Delegate,Microsoft.AspNetCore.Http.RequestDelegateFactoryOptions,Microsoft.AspNetCore.Http.RequestDelegateMetadataResult?,Microsoft.AspNetCore.Http.RequestDelegateResult> createRequestDelegate);
static member Map : Microsoft.AspNetCore.Routing.IEndpointRouteBuilder * string * Delegate * seq<string> * Func<System.Reflection.MethodInfo, Microsoft.AspNetCore.Http.RequestDelegateFactoryOptions, Microsoft.AspNetCore.Http.RequestDelegateMetadataResult> * Func<Delegate, Microsoft.AspNetCore.Http.RequestDelegateFactoryOptions, Microsoft.AspNetCore.Http.RequestDelegateMetadataResult, Microsoft.AspNetCore.Http.RequestDelegateResult> -> Microsoft.AspNetCore.Builder.RouteHandlerBuilder
Public Shared Function Map (endpoints As IEndpointRouteBuilder, pattern As String, handler As Delegate, httpMethods As IEnumerable(Of String), populateMetadata As Func(Of MethodInfo, RequestDelegateFactoryOptions, RequestDelegateMetadataResult), createRequestDelegate As Func(Of Delegate, RequestDelegateFactoryOptions, RequestDelegateMetadataResult, RequestDelegateResult)) As RouteHandlerBuilder

Parámetros

endpoints
IEndpointRouteBuilder

La IEndpointRouteBuilder a la que agregar la ruta.

pattern
String

Patrón de ruta.

handler
Delegate

Delegado ejecutado cuando se coincide con el punto de conexión.

httpMethods
IEnumerable<String>

Conjunto de métodos HTTP admitidos.

populateMetadata
Func<MethodInfo,RequestDelegateFactoryOptions,RequestDelegateMetadataResult>

Delegado para rellenar los metadatos del punto de conexión.

createRequestDelegate
Func<Delegate,RequestDelegateFactoryOptions,RequestDelegateMetadataResult,RequestDelegateResult>

Delegado para construir un requestDelegate.

Devoluciones

El RouteHandlerBuilder>.

Se aplica a

Map(IEndpointRouteBuilder, String, Delegate, IEnumerable<String>, Func<MethodInfo,RequestDelegateFactoryOptions,RequestDelegateMetadataResult>, Func<Delegate,RequestDelegateFactoryOptions,RequestDelegateMetadataResult, RequestDelegateResult>, MethodInfo)

Registra un punto de conexión con funciones personalizadas para construir un delegado de solicitud para su controlador y rellenar metadatos para el punto de conexión. Destinado al consumo en RequestDelegateGenerator.

public static Microsoft.AspNetCore.Builder.RouteHandlerBuilder Map (Microsoft.AspNetCore.Routing.IEndpointRouteBuilder endpoints, string pattern, Delegate handler, System.Collections.Generic.IEnumerable<string>? httpMethods, Func<System.Reflection.MethodInfo,Microsoft.AspNetCore.Http.RequestDelegateFactoryOptions?,Microsoft.AspNetCore.Http.RequestDelegateMetadataResult> populateMetadata, Func<Delegate,Microsoft.AspNetCore.Http.RequestDelegateFactoryOptions,Microsoft.AspNetCore.Http.RequestDelegateMetadataResult?,Microsoft.AspNetCore.Http.RequestDelegateResult> createRequestDelegate, System.Reflection.MethodInfo methodInfo);
static member Map : Microsoft.AspNetCore.Routing.IEndpointRouteBuilder * string * Delegate * seq<string> * Func<System.Reflection.MethodInfo, Microsoft.AspNetCore.Http.RequestDelegateFactoryOptions, Microsoft.AspNetCore.Http.RequestDelegateMetadataResult> * Func<Delegate, Microsoft.AspNetCore.Http.RequestDelegateFactoryOptions, Microsoft.AspNetCore.Http.RequestDelegateMetadataResult, Microsoft.AspNetCore.Http.RequestDelegateResult> * System.Reflection.MethodInfo -> Microsoft.AspNetCore.Builder.RouteHandlerBuilder
Public Shared Function Map (endpoints As IEndpointRouteBuilder, pattern As String, handler As Delegate, httpMethods As IEnumerable(Of String), populateMetadata As Func(Of MethodInfo, RequestDelegateFactoryOptions, RequestDelegateMetadataResult), createRequestDelegate As Func(Of Delegate, RequestDelegateFactoryOptions, RequestDelegateMetadataResult, RequestDelegateResult), methodInfo As MethodInfo) As RouteHandlerBuilder

Parámetros

endpoints
IEndpointRouteBuilder

La IEndpointRouteBuilder a la que agregar la ruta.

pattern
String

Patrón de ruta.

handler
Delegate

Delegado ejecutado cuando se coincide con el punto de conexión.

httpMethods
IEnumerable<String>

Conjunto de métodos HTTP admitidos.

populateMetadata
Func<MethodInfo,RequestDelegateFactoryOptions,RequestDelegateMetadataResult>

Delegado para rellenar los metadatos del punto de conexión.

createRequestDelegate
Func<Delegate,RequestDelegateFactoryOptions,RequestDelegateMetadataResult,RequestDelegateResult>

Delegado para construir un requestDelegate.

methodInfo
MethodInfo

MethodInfo asociado al delegado entrante.

Devoluciones

El RouteHandlerBuilder>.

Se aplica a