// Copyright (c) .NET Foundation. All rights reserved. // Licensed under the Apache License, Version 2.0. See License.txt in the project root for license information. using System; using System.Threading; using System.Threading.Tasks; using Microsoft.AspNetCore.Http.Features; namespace Microsoft.AspNetCore.Hosting { /// /// Represents a configured web host. /// public interface IWebHost : IDisposable { /// /// The exposed by the configured server. /// IFeatureCollection ServerFeatures { get; } /// /// The for the host. /// IServiceProvider Services { get; } /// /// Starts listening on the configured addresses. /// void Start(); /// /// Starts listening on the configured addresses. /// Task StartAsync(CancellationToken cancellationToken = default); /// /// Attempt to gracefully stop the host. /// /// /// Task StopAsync(CancellationToken cancellationToken = default); } }