ConnectionBuilderExtensions.Use Método

Definição

Sobrecargas

Use(IConnectionBuilder, Func<ConnectionContext,ConnectionDelegate,Task>)

Adicione o dado middleware à conexão. Se você não estiver chamando a próxima função, use Run(IConnectionBuilder, Func<ConnectionContext,Task>) em vez disso.

Use(IConnectionBuilder, Func<ConnectionContext,Func<Task>,Task>)

Adicione o dado middleware à conexão. Se você não estiver chamando a próxima função, use Run(IConnectionBuilder, Func<ConnectionContext,Task>) em vez disso.

Prefira usar Use(IConnectionBuilder, Func<ConnectionContext,ConnectionDelegate,Task>) para melhorar o desempenho, conforme mostrado abaixo:

builder.Use((context, next) =>
{
    return next(context);
});

Use(IConnectionBuilder, Func<ConnectionContext,ConnectionDelegate,Task>)

Origem:
ConnectionBuilderExtensions.cs
Origem:
ConnectionBuilderExtensions.cs

Adicione o dado middleware à conexão. Se você não estiver chamando a próxima função, use Run(IConnectionBuilder, Func<ConnectionContext,Task>) em vez disso.

public static Microsoft.AspNetCore.Connections.IConnectionBuilder Use (this Microsoft.AspNetCore.Connections.IConnectionBuilder connectionBuilder, Func<Microsoft.AspNetCore.Connections.ConnectionContext,Microsoft.AspNetCore.Connections.ConnectionDelegate,System.Threading.Tasks.Task> middleware);
static member Use : Microsoft.AspNetCore.Connections.IConnectionBuilder * Func<Microsoft.AspNetCore.Connections.ConnectionContext, Microsoft.AspNetCore.Connections.ConnectionDelegate, System.Threading.Tasks.Task> -> Microsoft.AspNetCore.Connections.IConnectionBuilder
<Extension()>
Public Function Use (connectionBuilder As IConnectionBuilder, middleware As Func(Of ConnectionContext, ConnectionDelegate, Task)) As IConnectionBuilder

Parâmetros

connectionBuilder
IConnectionBuilder

O IConnectionBuilder.

middleware
Func<ConnectionContext,ConnectionDelegate,Task>

O middleware a ser adicionado ao IConnectionBuilder.

Retornos

O IConnectionBuilder.

Aplica-se a

Use(IConnectionBuilder, Func<ConnectionContext,Func<Task>,Task>)

Origem:
ConnectionBuilderExtensions.cs
Origem:
ConnectionBuilderExtensions.cs
Origem:
ConnectionBuilderExtensions.cs
Origem:
ConnectionBuilderExtensions.cs
Origem:
ConnectionBuilderExtensions.cs
Origem:
ConnectionBuilderExtensions.cs
Origem:
ConnectionBuilderExtensions.cs
Origem:
ConnectionBuilderExtensions.cs
Origem:
ConnectionBuilderExtensions.cs

Adicione o dado middleware à conexão. Se você não estiver chamando a próxima função, use Run(IConnectionBuilder, Func<ConnectionContext,Task>) em vez disso.

Prefira usar Use(IConnectionBuilder, Func<ConnectionContext,ConnectionDelegate,Task>) para melhorar o desempenho, conforme mostrado abaixo:

builder.Use((context, next) =>
{
    return next(context);
});

public:
[System::Runtime::CompilerServices::Extension]
 static Microsoft::AspNetCore::Connections::IConnectionBuilder ^ Use(Microsoft::AspNetCore::Connections::IConnectionBuilder ^ connectionBuilder, Func<Microsoft::AspNetCore::Connections::ConnectionContext ^, Func<System::Threading::Tasks::Task ^> ^, System::Threading::Tasks::Task ^> ^ middleware);
public static Microsoft.AspNetCore.Connections.IConnectionBuilder Use (this Microsoft.AspNetCore.Connections.IConnectionBuilder connectionBuilder, Func<Microsoft.AspNetCore.Connections.ConnectionContext,Func<System.Threading.Tasks.Task>,System.Threading.Tasks.Task> middleware);
static member Use : Microsoft.AspNetCore.Connections.IConnectionBuilder * Func<Microsoft.AspNetCore.Connections.ConnectionContext, Func<System.Threading.Tasks.Task>, System.Threading.Tasks.Task> -> Microsoft.AspNetCore.Connections.IConnectionBuilder
<Extension()>
Public Function Use (connectionBuilder As IConnectionBuilder, middleware As Func(Of ConnectionContext, Func(Of Task), Task)) As IConnectionBuilder

Parâmetros

connectionBuilder
IConnectionBuilder

O IConnectionBuilder.

middleware
Func<ConnectionContext,Func<Task>,Task>

O middleware a ser adicionado ao IConnectionBuilder.

Retornos

O IConnectionBuilder.

Aplica-se a