Ejemplo n.º 1
0
        protected override void OnShutdown()
        {
            base.OnShutdown();

            WindowsEventLog.WriteInfoLog($"The {Environment.MachineName} server will be turned off.");
            ServiceLifeController.WillBeTurnOff();
        }
Ejemplo n.º 2
0
 protected override void OnStart(string[] args)
 {
     ServiceLifeController.ServiceStatusChanged += ServiceLifeController_ServiceStatusChanged;
     ServiceLifeController.StartLifeCycleController();
     WindowsEventLog.WriteInfoLog($"{ServiceName} Starting...");
 }