// Copyright (c) Microsoft Open Technologies, Inc. All rights reserved. // Licensed under the Apache License, Version 2.0. See License.txt in the project root for license information. using System.Threading; using Microsoft.Framework.Runtime; namespace Microsoft.AspNet.Hosting { /// /// Allows consumers to perform cleanup during a graceful shutdown. /// [AssemblyNeutral] public interface IApplicationLifetime { /// /// Triggered when the application host is performing a graceful shutdown. /// Request may still be in flight. Shutdown will block until this event completes. /// /// CancellationToken ApplicationStopping { get; } /// /// Triggered when the application host is performing a graceful shutdown. /// All requests should be complete at this point. Shutdown will block /// until this event completes. /// /// CancellationToken ApplicationStopped { get; } } }