Robuta

https://learn.microsoft.com/pt-br/dotnet/api/system.serviceprocess.servicebase.onshutdown?view=netframework-4.8.1 ServiceBase.OnShutdown Method (System.ServiceProcess) | Microsoft Learn When implemented in a derived class, executes when the system is shutting down. Specifies what should occur immediately prior to the system shutting down. methodsystemmicrosoftlearn