Utilize ASP.NET Core Application Lifetime Events

At times you need to know when your ASP.NET Core web application is being started and shutdown. One of the lesser known features of ASP.NET Core is the IApplicationLifetime interface that allows you to wire some logic when such application lifetime events occur. This article briefly discusses the IApplicationLifetime interface and its functionality.