ConnectionBuilderExtensions.Use 메서드
정의
중요
일부 정보는 릴리스되기 전에 상당 부분 수정될 수 있는 시험판 제품과 관련이 있습니다. Microsoft는 여기에 제공된 정보에 대해 어떠한 명시적이거나 묵시적인 보증도 하지 않습니다.
오버로드
Use(IConnectionBuilder, Func<ConnectionContext,ConnectionDelegate,Task>) |
지정된 |
Use(IConnectionBuilder, Func<ConnectionContext,Func<Task>,Task>) |
지정된 아래와 같이 더 나은 성능을 위해 를 사용하는 Use(IConnectionBuilder, Func<ConnectionContext,ConnectionDelegate,Task>) 것이 좋습니다.
|
Use(IConnectionBuilder, Func<ConnectionContext,ConnectionDelegate,Task>)
지정된 middleware
를 연결에 추가합니다.
다음 함수를 호출하지 않는 경우 대신 를 사용합니다 Run(IConnectionBuilder, Func<ConnectionContext,Task>) .
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
매개 변수
- connectionBuilder
- IConnectionBuilder
- middleware
- Func<ConnectionContext,ConnectionDelegate,Task>
에 추가할 미들웨어입니다 IConnectionBuilder.
반환
적용 대상
Use(IConnectionBuilder, Func<ConnectionContext,Func<Task>,Task>)
지정된 middleware
를 연결에 추가합니다.
다음 함수를 호출하지 않는 경우 대신 를 사용합니다 Run(IConnectionBuilder, Func<ConnectionContext,Task>) .
아래와 같이 더 나은 성능을 위해 를 사용하는 Use(IConnectionBuilder, Func<ConnectionContext,ConnectionDelegate,Task>) 것이 좋습니다.
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
매개 변수
- connectionBuilder
- IConnectionBuilder
- middleware
- Func<ConnectionContext,Func<Task>,Task>
에 추가할 미들웨어입니다 IConnectionBuilder.