Bagikan melalui


RouteHandlerServices.Map Metode

Definisi

Overload

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

Mendaftarkan titik akhir dengan fungsi kustom untuk membuat delegasi permintaan untuk handler dan mengisi metadata untuk titik akhir. Ditujukan untuk konsumsi di RequestDelegateGenerator.

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

Mendaftarkan titik akhir dengan fungsi kustom untuk membuat delegasi permintaan untuk handler dan mengisi metadata untuk titik akhir. Ditujukan untuk konsumsi di RequestDelegateGenerator.

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

Sumber:
RouteHandlerServices.cs

Mendaftarkan titik akhir dengan fungsi kustom untuk membuat delegasi permintaan untuk handler dan mengisi metadata untuk titik akhir. Ditujukan untuk konsumsi di 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

Parameter

endpoints
IEndpointRouteBuilder

IEndpointRouteBuilder untuk menambahkan rute.

pattern
String

Pola rute.

handler
Delegate

Delegasi dijalankan saat titik akhir dicocokkan.

httpMethods
IEnumerable<String>

Kumpulan metode HTTP yang didukung.

populateMetadata
Func<MethodInfo,RequestDelegateFactoryOptions,RequestDelegateMetadataResult>

Delegasi untuk mengisi metadata titik akhir.

createRequestDelegate
Func<Delegate,RequestDelegateFactoryOptions,RequestDelegateMetadataResult,RequestDelegateResult>

Delegasi untuk membuat RequestDelegate.

Mengembalikan

RouteHandlerBuilder >.

Berlaku untuk

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

Mendaftarkan titik akhir dengan fungsi kustom untuk membuat delegasi permintaan untuk handler dan mengisi metadata untuk titik akhir. Ditujukan untuk konsumsi di 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

Parameter

endpoints
IEndpointRouteBuilder

IEndpointRouteBuilder untuk menambahkan rute.

pattern
String

Pola rute.

handler
Delegate

Delegasi dijalankan saat titik akhir dicocokkan.

httpMethods
IEnumerable<String>

Kumpulan metode HTTP yang didukung.

populateMetadata
Func<MethodInfo,RequestDelegateFactoryOptions,RequestDelegateMetadataResult>

Delegasi untuk mengisi metadata titik akhir.

createRequestDelegate
Func<Delegate,RequestDelegateFactoryOptions,RequestDelegateMetadataResult,RequestDelegateResult>

Delegasi untuk membuat RequestDelegate.

methodInfo
MethodInfo

MethodInfo yang terkait dengan delegasi masuk.

Mengembalikan

RouteHandlerBuilder >.

Berlaku untuk