共用方式為


RequestDelegateFactory.Create 方法

定義

多載

Create(Delegate, RequestDelegateFactoryOptions)

RequestDelegate建立 的實作 handler

Create(Delegate, RequestDelegateFactoryOptions, RequestDelegateMetadataResult)

RequestDelegate建立 的實作 handler

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

RequestDelegate建立 的實作 methodInfo

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

RequestDelegate建立 的實作 methodInfo

Create(Delegate, RequestDelegateFactoryOptions)

來源:
RequestDelegateFactory.cs

RequestDelegate建立 的實作 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

參數

handler
Delegate

具有任意數目自訂參數的要求處理常式,這些參數通常會產生具有其傳回值的回應。

options
RequestDelegateFactoryOptions

RequestDelegateFactoryOptions,用來設定處理常式的行為。

傳回

RequestDelegateResult

適用於

Create(Delegate, RequestDelegateFactoryOptions, RequestDelegateMetadataResult)

來源:
RequestDelegateFactory.cs

RequestDelegate建立 的實作 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

參數

handler
Delegate

具有任意數目自訂參數的要求處理常式,這些參數通常會產生具有其傳回值的回應。

options
RequestDelegateFactoryOptions

RequestDelegateFactoryOptions,用來設定處理常式的行為。

metadataResult
RequestDelegateMetadataResult

如果在建立最終 RequestDelegate 之前用來推斷中繼資料,則從 InferMetadata(MethodInfo, RequestDelegateFactoryOptions) 傳回的結果。 如果 null 為 ,這個對 方法的呼叫 Create(Delegate, RequestDelegateFactoryOptions, RequestDelegateMetadataResult) 會推斷為相同的 Method 中繼資料 InferMetadata(MethodInfo, RequestDelegateFactoryOptions) ,並填 EndpointBuilder 入該中繼資料。 否則,將會略過這個中繼資料推斷,因為此步驟已經完成。

傳回

RequestDelegateResult

適用於

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

來源:
RequestDelegateFactory.cs

RequestDelegate建立 的實作 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

參數

methodInfo
MethodInfo

具有任意數目自訂參數的要求處理常式,這些參數通常會產生具有其傳回值的回應。

targetFactory
Func<HttpContext,Object>

this建立非靜態方法的 。

options
RequestDelegateFactoryOptions

RequestDelegateFactoryOptions,用來設定處理常式的行為。

傳回

RequestDelegate

適用於

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

來源:
RequestDelegateFactory.cs

RequestDelegate建立 的實作 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

參數

methodInfo
MethodInfo

具有任意數目自訂參數的要求處理常式,這些參數通常會產生具有其傳回值的回應。

targetFactory
Func<HttpContext,Object>

this建立非靜態方法的 。

options
RequestDelegateFactoryOptions

RequestDelegateFactoryOptions,用來設定處理常式的行為。

metadataResult
RequestDelegateMetadataResult

如果在建立最終 RequestDelegate 之前用來推斷中繼資料,則從 InferMetadata(MethodInfo, RequestDelegateFactoryOptions) 傳回的結果。 如果 null 為 ,這個對 方法的呼叫 Create(Delegate, RequestDelegateFactoryOptions, RequestDelegateMetadataResult) 會推斷為相同的 Method 中繼資料 InferMetadata(MethodInfo, RequestDelegateFactoryOptions) ,並填 EndpointBuilder 入該中繼資料。 否則,將會略過這個中繼資料推斷,因為此步驟已經完成。

傳回

RequestDelegate

適用於