Sdílet prostřednictvím


RouteHandlerServices.Map Metoda

Definice

Přetížení

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

Zaregistruje koncový bod s vlastními funkcemi pro vytvoření delegáta požadavku pro jeho obslužnou rutinu a naplnění metadat pro koncový bod. Určeno ke spotřebě v RequestDelegateGenerator.

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

Zaregistruje koncový bod s vlastními funkcemi pro vytvoření delegáta požadavku pro jeho obslužnou rutinu a naplnění metadat pro koncový bod. Určeno ke spotřebě v RequestDelegateGenerator.

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

Zdroj:
RouteHandlerServices.cs

Zaregistruje koncový bod s vlastními funkcemi pro vytvoření delegáta požadavku pro jeho obslužnou rutinu a naplnění metadat pro koncový bod. Určeno ke spotřebě v 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

Parametry

endpoints
IEndpointRouteBuilder

IEndpointRouteBuilder přidat trasu.

pattern
String

Vzor trasy.

handler
Delegate

Delegát se spustí, když se koncový bod shoduje.

httpMethods
IEnumerable<String>

Sada podporovaných metod HTTP.

populateMetadata
Func<MethodInfo,RequestDelegateFactoryOptions,RequestDelegateMetadataResult>

Delegát pro naplnění metadat koncového bodu.

createRequestDelegate
Func<Delegate,RequestDelegateFactoryOptions,RequestDelegateMetadataResult,RequestDelegateResult>

Delegát pro vytvoření RequestDelegate.

Návraty

RouteHandlerBuilder >.

Platí pro

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

Zaregistruje koncový bod s vlastními funkcemi pro vytvoření delegáta požadavku pro jeho obslužnou rutinu a naplnění metadat pro koncový bod. Určeno ke spotřebě v 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

Parametry

endpoints
IEndpointRouteBuilder

IEndpointRouteBuilder přidat trasu.

pattern
String

Vzor trasy.

handler
Delegate

Delegát se spustí, když se koncový bod shoduje.

httpMethods
IEnumerable<String>

Sada podporovaných metod HTTP.

populateMetadata
Func<MethodInfo,RequestDelegateFactoryOptions,RequestDelegateMetadataResult>

Delegát pro naplnění metadat koncového bodu.

createRequestDelegate
Func<Delegate,RequestDelegateFactoryOptions,RequestDelegateMetadataResult,RequestDelegateResult>

Delegát pro vytvoření RequestDelegate.

methodInfo
MethodInfo

MethodInfo přidružené k příchozí delegát.

Návraty

RouteHandlerBuilder >.

Platí pro