32 lines
1.1 KiB
C#
32 lines
1.1 KiB
C#
// 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.
|
|
|
|
namespace Microsoft.AspNetCore.Hosting
|
|
{
|
|
/// <summary>
|
|
/// Allows consumers to perform cleanup during a graceful shutdown.
|
|
/// </summary>
|
|
public interface IApplicationLifetimeEvents
|
|
{
|
|
/// <summary>
|
|
/// Triggered when the application host has fully started and is about to wait
|
|
/// for a graceful shutdown.
|
|
/// </summary>
|
|
void OnApplicationStarted();
|
|
|
|
/// <summary>
|
|
/// Triggered when the application host is performing a graceful shutdown.
|
|
/// Requests may still be in flight. Shutdown will block until this event completes.
|
|
/// </summary>
|
|
void OnApplicationStopping();
|
|
|
|
/// <summary>
|
|
/// 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.
|
|
/// </summary>
|
|
void OnApplicationStopped();
|
|
|
|
}
|
|
}
|