RequestDelegateFactory.Create Metoda
Definicja
Ważne
Niektóre informacje odnoszą się do produktu w wersji wstępnej, który może zostać znacząco zmodyfikowany przed wydaniem. Firma Microsoft nie udziela żadnych gwarancji, jawnych lub domniemanych, w odniesieniu do informacji podanych w tym miejscu.
Przeciążenia
Create(Delegate, RequestDelegateFactoryOptions) |
Tworzy implementację RequestDelegate dla programu |
Create(Delegate, RequestDelegateFactoryOptions, RequestDelegateMetadataResult) |
Tworzy implementację RequestDelegate dla programu |
Create(MethodInfo, Func<HttpContext,Object>, RequestDelegateFactoryOptions) |
Tworzy implementację RequestDelegate dla programu |
Create(MethodInfo, Func<HttpContext,Object>, RequestDelegateFactoryOptions, RequestDelegateMetadataResult) |
Tworzy implementację RequestDelegate dla programu |
Create(Delegate, RequestDelegateFactoryOptions)
- Źródło:
- RequestDelegateFactory.cs
Tworzy implementację RequestDelegate dla programu handler
.
public static Microsoft.AspNetCore.Http.RequestDelegateResult Create(Delegate handler, Microsoft.AspNetCore.Http.RequestDelegateFactoryOptions? options);
public static Microsoft.AspNetCore.Http.RequestDelegateResult Create(Delegate handler, Microsoft.AspNetCore.Http.RequestDelegateFactoryOptions? options = default);
static member Create : Delegate * Microsoft.AspNetCore.Http.RequestDelegateFactoryOptions -> Microsoft.AspNetCore.Http.RequestDelegateResult
Public Shared Function Create (handler As Delegate, options As RequestDelegateFactoryOptions) As RequestDelegateResult
Public Shared Function Create (handler As Delegate, Optional options As RequestDelegateFactoryOptions = Nothing) As RequestDelegateResult
Parametry
- handler
- Delegate
Procedura obsługi żądań z dowolną liczbą parametrów niestandardowych, która często generuje odpowiedź z wartością zwracaną.
- options
- RequestDelegateFactoryOptions
Element RequestDelegateFactoryOptions używany do konfigurowania zachowania programu obsługi.
Zwraca
Element RequestDelegateResult.
Dotyczy
Create(Delegate, RequestDelegateFactoryOptions, RequestDelegateMetadataResult)
- Źródło:
- RequestDelegateFactory.cs
Tworzy implementację RequestDelegate dla programu 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
Parametry
- handler
- Delegate
Procedura obsługi żądań z dowolną liczbą parametrów niestandardowych, która często generuje odpowiedź z wartością zwracaną.
- options
- RequestDelegateFactoryOptions
Element RequestDelegateFactoryOptions używany do konfigurowania zachowania programu obsługi.
- metadataResult
- RequestDelegateMetadataResult
Wynik zwrócony z InferMetadata(MethodInfo, RequestDelegateFactoryOptions) elementu , jeśli został użyty do wnioskowania metadanych przed utworzeniem końcowego elementu RequestDelegate.
Jeśli null
metoda , to wywołanie Create(Delegate, RequestDelegateFactoryOptions, RequestDelegateMetadataResult) metody wywnioskuje metadane, które InferMetadata(MethodInfo, RequestDelegateFactoryOptions) zostałyby wywnioskowane dla tych samych Method metadanych i wypełnione EndpointBuilder tymi metadanymi. W przeciwnym razie to wnioskowanie metadanych zostanie pominięte, ponieważ ten krok został już wykonany.
Zwraca
Element RequestDelegateResult.
Dotyczy
Create(MethodInfo, Func<HttpContext,Object>, RequestDelegateFactoryOptions)
- Źródło:
- RequestDelegateFactory.cs
Tworzy implementację RequestDelegate dla programu methodInfo
.
public static Microsoft.AspNetCore.Http.RequestDelegateResult Create(System.Reflection.MethodInfo methodInfo, Func<Microsoft.AspNetCore.Http.HttpContext,object>? targetFactory, Microsoft.AspNetCore.Http.RequestDelegateFactoryOptions? options);
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);
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, targetFactory As Func(Of HttpContext, Object), options As RequestDelegateFactoryOptions) As RequestDelegateResult
Public Shared Function Create (methodInfo As MethodInfo, Optional targetFactory As Func(Of HttpContext, Object) = Nothing, Optional options As RequestDelegateFactoryOptions = Nothing) As RequestDelegateResult
Parametry
- methodInfo
- MethodInfo
Procedura obsługi żądań z dowolną liczbą parametrów niestandardowych, która często generuje odpowiedź z wartością zwracaną.
- targetFactory
- Func<HttpContext,Object>
Tworzy metodę this
dla metody niestatycznej.
- options
- RequestDelegateFactoryOptions
Element RequestDelegateFactoryOptions używany do konfigurowania zachowania programu obsługi.
Zwraca
Element RequestDelegate.
Dotyczy
Create(MethodInfo, Func<HttpContext,Object>, RequestDelegateFactoryOptions, RequestDelegateMetadataResult)
- Źródło:
- RequestDelegateFactory.cs
Tworzy implementację RequestDelegate dla programu 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
Parametry
- methodInfo
- MethodInfo
Procedura obsługi żądań z dowolną liczbą parametrów niestandardowych, która często generuje odpowiedź z wartością zwracaną.
- targetFactory
- Func<HttpContext,Object>
Tworzy metodę this
dla metody niestatycznej.
- options
- RequestDelegateFactoryOptions
Element RequestDelegateFactoryOptions używany do konfigurowania zachowania programu obsługi.
- metadataResult
- RequestDelegateMetadataResult
Wynik zwrócony z InferMetadata(MethodInfo, RequestDelegateFactoryOptions) elementu , jeśli został użyty do wnioskowania metadanych przed utworzeniem końcowego elementu RequestDelegate.
Jeśli null
metoda , to wywołanie Create(Delegate, RequestDelegateFactoryOptions, RequestDelegateMetadataResult) metody wywnioskuje metadane, które InferMetadata(MethodInfo, RequestDelegateFactoryOptions) zostałyby wywnioskowane dla tych samych Method metadanych i wypełnione EndpointBuilder tymi metadanymi. W przeciwnym razie to wnioskowanie metadanych zostanie pominięte, ponieważ ten krok został już wykonany.
Zwraca
Element RequestDelegate.