Microsoft.AspNetCore.Hosting.Abstractions by Microsoft

<PackageReference Include="Microsoft.AspNetCore.Hosting.Abstractions" Version="2.1.0" />

 IWebHost

public interface IWebHost : IDisposable
Represents a configured web host.

The IFeatureCollection exposed by the configured server.

The IServiceProvider for the host.

void Start()

Starts listening on the configured addresses.

Task StartAsync(CancellationToken cancellationToken = default)

Starts listening on the configured addresses.

Task StopAsync(CancellationToken cancellationToken = default)

Attempt to gracefully stop the host.