// Spludlow Software // Copyright © Samuel P. Ludlow 2020 All Rights Reserved // Distributed under the terms of the GNU General Public License version 3 // Distributed WITHOUT ANY WARRANTY; without implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE // https://www.spludlow.co.uk/LICENCE.TXT // The Spludlow logo is a registered trademark of Samuel P. Ludlow and may not be used without permission // v1.14 using System; using System.Collections.Generic; using System.ComponentModel; using System.Data; using System.Diagnostics; using System.Linq; using System.ServiceProcess; using System.Text; using System.Threading.Tasks; using System.ServiceModel; namespace Spludlow_Service32 { public partial class Service1 : ServiceBase { public Service1() { InitializeComponent(); AppDomain.CurrentDomain.UnhandledException += CurrentDomain_UnhandledException; } private void CurrentDomain_UnhandledException(object sender, UnhandledExceptionEventArgs e) { Spludlow.Log.Error("CurrentDomain_UnhandledException"); } private ServiceHost _ServiceHost; protected override void OnStart(string[] args) { this._ServiceHost = Spludlow.Service.ServiceStart(); } protected override void OnStop() { Spludlow.Service.ServiceStop(this._ServiceHost); } } }