/// <summary> /// Terminates current service instance. /// </summary> /// <param name="e">For more information, please see <see cref="ServiceShutdownEventArgs"/> class.</param> internal static void Terminate( ServiceShutdownEventArgs e ) { if ( e != null && e.LastException != null ) Logger.Exception(e.LastException, e.Message); Logger.WriteLine(Source.Service, "Unexpected service termination."); Environment.Exit(-1); }
/// <summary> /// Terminates current service instance. /// </summary> /// <param name="e">For more information, please see <see cref="ServiceShutdownEventArgs"/> class.</param> internal static void Terminate(ServiceShutdownEventArgs e) { if (e != null && e.LastException != null) { Logger.Exception(e.LastException, e.Message); } Logger.WriteLine(Source.Service, "Unexpected service termination."); Environment.Exit(-1); }