Share via


RequestDelegateFactory.Create Metodo

Definizione

Overload

Create(Delegate, RequestDelegateFactoryOptions)

Crea un'implementazione RequestDelegate per handler.

Create(Delegate, RequestDelegateFactoryOptions, RequestDelegateMetadataResult)

Crea un'implementazione RequestDelegate per handler.

Create(MethodInfo, Func<HttpContext,Object>, RequestDelegateFactoryOptions)

Crea un'implementazione RequestDelegate per methodInfo.

Create(MethodInfo, Func<HttpContext,Object>, RequestDelegateFactoryOptions, RequestDelegateMetadataResult)

Crea un'implementazione RequestDelegate per methodInfo.

Create(Delegate, RequestDelegateFactoryOptions)

Crea un'implementazione RequestDelegate per handler.

public static Microsoft.AspNetCore.Http.RequestDelegateResult Create (Delegate handler, Microsoft.AspNetCore.Http.RequestDelegateFactoryOptions? options = default);
public static Microsoft.AspNetCore.Http.RequestDelegateResult Create (Delegate handler, Microsoft.AspNetCore.Http.RequestDelegateFactoryOptions? options);
static member Create : Delegate * Microsoft.AspNetCore.Http.RequestDelegateFactoryOptions -> Microsoft.AspNetCore.Http.RequestDelegateResult
Public Shared Function Create (handler As Delegate, Optional options As RequestDelegateFactoryOptions = Nothing) As RequestDelegateResult
Public Shared Function Create (handler As Delegate, options As RequestDelegateFactoryOptions) As RequestDelegateResult

Parametri

handler
Delegate

Gestore di richieste con un numero qualsiasi di parametri personalizzati che spesso produce una risposta con il relativo valore restituito.

options
RequestDelegateFactoryOptions

Oggetto RequestDelegateFactoryOptions utilizzato per configurare il comportamento del gestore.

Restituisce

Oggetto RequestDelegateResult.

Si applica a

Create(Delegate, RequestDelegateFactoryOptions, RequestDelegateMetadataResult)

Crea un'implementazione RequestDelegate per handler.

public static Microsoft.AspNetCore.Http.RequestDelegateResult Create (Delegate handler, Microsoft.AspNetCore.Http.RequestDelegateFactoryOptions? options = default, Microsoft.AspNetCore.Http.RequestDelegateMetadataResult? metadataResult = default);
static member Create : Delegate * Microsoft.AspNetCore.Http.RequestDelegateFactoryOptions * Microsoft.AspNetCore.Http.RequestDelegateMetadataResult -> Microsoft.AspNetCore.Http.RequestDelegateResult
Public Shared Function Create (handler As Delegate, Optional options As RequestDelegateFactoryOptions = Nothing, Optional metadataResult As RequestDelegateMetadataResult = Nothing) As RequestDelegateResult

Parametri

handler
Delegate

Gestore di richieste con un numero qualsiasi di parametri personalizzati che spesso produce una risposta con il relativo valore restituito.

options
RequestDelegateFactoryOptions

Oggetto RequestDelegateFactoryOptions utilizzato per configurare il comportamento del gestore.

metadataResult
RequestDelegateMetadataResult

Risultato restituito da InferMetadata(MethodInfo, RequestDelegateFactoryOptions) se è stato usato per dedurre i metadati prima di creare l'oggetto RequestDelegate finale. Se null, questa chiamata al Create(Delegate, RequestDelegateFactoryOptions, RequestDelegateMetadataResult) metodo dedurrà i metadati che InferMetadata(MethodInfo, RequestDelegateFactoryOptions) verrebbero dedotti per lo stesso Method e popolati EndpointBuilder con tali metadati. In caso contrario, questa inferenza dei metadati verrà ignorata perché questo passaggio è già stato fatto.

Restituisce

Oggetto RequestDelegateResult.

Si applica a

Create(MethodInfo, Func<HttpContext,Object>, RequestDelegateFactoryOptions)

Crea un'implementazione RequestDelegate per methodInfo.

public static Microsoft.AspNetCore.Http.RequestDelegateResult Create (System.Reflection.MethodInfo methodInfo, Func<Microsoft.AspNetCore.Http.HttpContext,object>? targetFactory = default, Microsoft.AspNetCore.Http.RequestDelegateFactoryOptions? options = default);
public static Microsoft.AspNetCore.Http.RequestDelegateResult Create (System.Reflection.MethodInfo methodInfo, Func<Microsoft.AspNetCore.Http.HttpContext,object>? targetFactory, Microsoft.AspNetCore.Http.RequestDelegateFactoryOptions? options);
static member Create : System.Reflection.MethodInfo * Func<Microsoft.AspNetCore.Http.HttpContext, obj> * Microsoft.AspNetCore.Http.RequestDelegateFactoryOptions -> Microsoft.AspNetCore.Http.RequestDelegateResult
Public Shared Function Create (methodInfo As MethodInfo, Optional targetFactory As Func(Of HttpContext, Object) = Nothing, Optional options As RequestDelegateFactoryOptions = Nothing) As RequestDelegateResult
Public Shared Function Create (methodInfo As MethodInfo, targetFactory As Func(Of HttpContext, Object), options As RequestDelegateFactoryOptions) As RequestDelegateResult

Parametri

methodInfo
MethodInfo

Gestore di richieste con un numero qualsiasi di parametri personalizzati che spesso produce una risposta con il relativo valore restituito.

targetFactory
Func<HttpContext,Object>

Crea l'oggetto this per il metodo non statico.

options
RequestDelegateFactoryOptions

Oggetto RequestDelegateFactoryOptions utilizzato per configurare il comportamento del gestore.

Restituisce

Oggetto RequestDelegate.

Si applica a

Create(MethodInfo, Func<HttpContext,Object>, RequestDelegateFactoryOptions, RequestDelegateMetadataResult)

Crea un'implementazione RequestDelegate per methodInfo.

public static Microsoft.AspNetCore.Http.RequestDelegateResult Create (System.Reflection.MethodInfo methodInfo, Func<Microsoft.AspNetCore.Http.HttpContext,object>? targetFactory = default, Microsoft.AspNetCore.Http.RequestDelegateFactoryOptions? options = default, Microsoft.AspNetCore.Http.RequestDelegateMetadataResult? metadataResult = default);
static member Create : System.Reflection.MethodInfo * Func<Microsoft.AspNetCore.Http.HttpContext, obj> * Microsoft.AspNetCore.Http.RequestDelegateFactoryOptions * Microsoft.AspNetCore.Http.RequestDelegateMetadataResult -> Microsoft.AspNetCore.Http.RequestDelegateResult
Public Shared Function Create (methodInfo As MethodInfo, Optional targetFactory As Func(Of HttpContext, Object) = Nothing, Optional options As RequestDelegateFactoryOptions = Nothing, Optional metadataResult As RequestDelegateMetadataResult = Nothing) As RequestDelegateResult

Parametri

methodInfo
MethodInfo

Gestore di richieste con un numero qualsiasi di parametri personalizzati che spesso produce una risposta con il relativo valore restituito.

targetFactory
Func<HttpContext,Object>

Crea l'oggetto this per il metodo non statico.

options
RequestDelegateFactoryOptions

Oggetto RequestDelegateFactoryOptions utilizzato per configurare il comportamento del gestore.

metadataResult
RequestDelegateMetadataResult

Risultato restituito da InferMetadata(MethodInfo, RequestDelegateFactoryOptions) se è stato usato per dedurre i metadati prima di creare l'oggetto RequestDelegate finale. Se null, questa chiamata al Create(Delegate, RequestDelegateFactoryOptions, RequestDelegateMetadataResult) metodo dedurrà i metadati che InferMetadata(MethodInfo, RequestDelegateFactoryOptions) verrebbero dedotti per lo stesso Method e popolati EndpointBuilder con tali metadati. In caso contrario, questa inferenza dei metadati verrà ignorata perché questo passaggio è già stato fatto.

Restituisce

Oggetto RequestDelegate.

Si applica a