TestServer.SendAsync(Action<HttpContext>, CancellationToken) 方法

定义

创建、配置、发送和返回 HttpContext。 启动响应后,此操作就会完成。

public System.Threading.Tasks.Task<Microsoft.AspNetCore.Http.HttpContext> SendAsync (Action<Microsoft.AspNetCore.Http.HttpContext> configureContext, System.Threading.CancellationToken cancellationToken = default);
member this.SendAsync : Action<Microsoft.AspNetCore.Http.HttpContext> * System.Threading.CancellationToken -> System.Threading.Tasks.Task<Microsoft.AspNetCore.Http.HttpContext>
Public Function SendAsync (configureContext As Action(Of HttpContext), Optional cancellationToken As CancellationToken = Nothing) As Task(Of HttpContext)

参数

configureContext
Action<HttpContext>
cancellationToken
CancellationToken

返回

适用于