Freigeben über


RouteHandlerServices.Map Methode

Definition

Überlädt

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

Registriert einen Endpunkt mit benutzerdefinierten Funktionen zum Erstellen eines Anforderungsdelegats für seinen Handler und zum Auffüllen von Metadaten für den Endpunkt. Für den Verbrauch im RequestDelegateGenerator vorgesehen.

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

Registriert einen Endpunkt mit benutzerdefinierten Funktionen zum Erstellen eines Anforderungsdelegats für seinen Handler und zum Auffüllen von Metadaten für den Endpunkt. Für den Verbrauch im RequestDelegateGenerator vorgesehen.

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

Quelle:
RouteHandlerServices.cs

Registriert einen Endpunkt mit benutzerdefinierten Funktionen zum Erstellen eines Anforderungsdelegats für seinen Handler und zum Auffüllen von Metadaten für den Endpunkt. Für den Verbrauch im RequestDelegateGenerator vorgesehen.

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

Parameter

endpoints
IEndpointRouteBuilder

Die IEndpointRouteBuilder, der die Route hinzugefügt werden soll.

pattern
String

Das Routenmuster.

handler
Delegate

Die Stellvertretung, die beim Abgleich des Endpunkts ausgeführt wird.

httpMethods
IEnumerable<String>

Die Gruppe der unterstützten HTTP-Methoden.

populateMetadata
Func<MethodInfo,RequestDelegateFactoryOptions,RequestDelegateMetadataResult>

Ein Delegat zum Auffüllen von Endpunktmetadaten.

createRequestDelegate
Func<Delegate,RequestDelegateFactoryOptions,RequestDelegateMetadataResult,RequestDelegateResult>

Ein Delegat zum Erstellen eines RequestDelegate-

Gibt zurück

Die RouteHandlerBuilder>.

Gilt für:

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

Registriert einen Endpunkt mit benutzerdefinierten Funktionen zum Erstellen eines Anforderungsdelegats für seinen Handler und zum Auffüllen von Metadaten für den Endpunkt. Für den Verbrauch im RequestDelegateGenerator vorgesehen.

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

Parameter

endpoints
IEndpointRouteBuilder

Die IEndpointRouteBuilder, der die Route hinzugefügt werden soll.

pattern
String

Das Routenmuster.

handler
Delegate

Die Stellvertretung, die beim Abgleich des Endpunkts ausgeführt wird.

httpMethods
IEnumerable<String>

Die Gruppe der unterstützten HTTP-Methoden.

populateMetadata
Func<MethodInfo,RequestDelegateFactoryOptions,RequestDelegateMetadataResult>

Ein Delegat zum Auffüllen von Endpunktmetadaten.

createRequestDelegate
Func<Delegate,RequestDelegateFactoryOptions,RequestDelegateMetadataResult,RequestDelegateResult>

Ein Delegat zum Erstellen eines RequestDelegate-

methodInfo
MethodInfo

The MethodInfo associated with the incoming delegate.

Gibt zurück

Die RouteHandlerBuilder>.

Gilt für: