TestServer Class

Definition

public ref class TestServer : IDisposable, Microsoft::AspNetCore::Hosting::Server::IServer
public class TestServer : IDisposable, Microsoft.AspNetCore.Hosting.Server.IServer
type TestServer = class
    interface IServer
    interface IDisposable
Public Class TestServer
Implements IDisposable, IServer
Inheritance
TestServer
Implements

Constructors

TestServer(IServiceProvider)

For use with IHostBuilder.

TestServer(IServiceProvider, IFeatureCollection)

For use with IHostBuilder.

TestServer(IWebHostBuilder)

For use with IWebHostBuilder.

TestServer(IWebHostBuilder, IFeatureCollection)

For use with IWebHostBuilder.

Properties

AllowSynchronousIO

Gets or sets a value that controls whether synchronous IO is allowed for the Request and Response. The default value is false.

BaseAddress
Features
Host
PreserveExecutionContext

Gets or sets a value that controls if ExecutionContext and AsyncLocal<T> values are preserved from the client to the server. The default value is false.

Services

Methods

CreateClient()
CreateHandler()
CreateRequest(String)

Begins constructing a request message for submission.

CreateWebSocketClient()
Dispose()
SendAsync(Action<HttpContext>, CancellationToken)

Creates, configures, sends, and returns a HttpContext. This completes as soon as the response is started.

Explicit Interface Implementations

IServer.Features
IServer.Start<TContext>(IHttpApplication<TContext>)
IServer.StartAsync<TContext>(IHttpApplication<TContext>, CancellationToken)
IServer.StopAsync(CancellationToken)

Applies to