Partilhar via


MiddlewareWorkerApplicationBuilderExtensions.UseMiddleware Método

Definição

Sobrecargas

UseMiddleware(IFunctionsWorkerApplicationBuilder, Func<FunctionContext,Func<Task>,Task>)

Configura o IFunctionsWorkerApplicationBuilder para usar o delegado de middleware embutido fornecido.

UseMiddleware<T>(IFunctionsWorkerApplicationBuilder)

Configura o IFunctionsWorkerApplicationBuilder para usar o tipo de middleware fornecido.

UseMiddleware(IFunctionsWorkerApplicationBuilder, Func<FunctionContext,Func<Task>,Task>)

Origem:
WorkerMiddlewareWorkerApplicationBuilderExtensions.cs

Configura o IFunctionsWorkerApplicationBuilder para usar o delegado de middleware embutido fornecido.

public static Microsoft.Azure.Functions.Worker.IFunctionsWorkerApplicationBuilder UseMiddleware (this Microsoft.Azure.Functions.Worker.IFunctionsWorkerApplicationBuilder builder, Func<Microsoft.Azure.Functions.Worker.FunctionContext,Func<System.Threading.Tasks.Task>,System.Threading.Tasks.Task> middleware);
static member UseMiddleware : Microsoft.Azure.Functions.Worker.IFunctionsWorkerApplicationBuilder * Func<Microsoft.Azure.Functions.Worker.FunctionContext, Func<System.Threading.Tasks.Task>, System.Threading.Tasks.Task> -> Microsoft.Azure.Functions.Worker.IFunctionsWorkerApplicationBuilder
<Extension()>
Public Function UseMiddleware (builder As IFunctionsWorkerApplicationBuilder, middleware As Func(Of FunctionContext, Func(Of Task), Task)) As IFunctionsWorkerApplicationBuilder

Parâmetros

middleware
Func<FunctionContext,Func<Task>,Task>

O middleware a ser adicionado ao pipeline de invocação.

Retornos

O mesmo IFunctionsWorkerApplicationBuilder para encadeamento.

Aplica-se a

UseMiddleware<T>(IFunctionsWorkerApplicationBuilder)

Origem:
WorkerMiddlewareWorkerApplicationBuilderExtensions.cs

Configura o IFunctionsWorkerApplicationBuilder para usar o tipo de middleware fornecido.

public static Microsoft.Azure.Functions.Worker.IFunctionsWorkerApplicationBuilder UseMiddleware<T> (this Microsoft.Azure.Functions.Worker.IFunctionsWorkerApplicationBuilder builder) where T : class, Microsoft.Azure.Functions.Worker.Middleware.IFunctionsWorkerMiddleware;
static member UseMiddleware : Microsoft.Azure.Functions.Worker.IFunctionsWorkerApplicationBuilder -> Microsoft.Azure.Functions.Worker.IFunctionsWorkerApplicationBuilder (requires 'T : null and 'T :> Microsoft.Azure.Functions.Worker.Middleware.IFunctionsWorkerMiddleware)
<Extension()>
Public Function UseMiddleware(Of T As {Class, IFunctionsWorkerMiddleware}) (builder As IFunctionsWorkerApplicationBuilder) As IFunctionsWorkerApplicationBuilder

Parâmetros de tipo

T

Parâmetros

Retornos

A mesma instância do IFunctionsWorkerApplicationBuilder para encadeamento.

Aplica-se a