Base class for building Windows Services, using Topshelf as a Service Host. This base class simplify building cancelable windows services.
public static class Program
{
private static void Main()
{
// One line main procedure
TopshelfUtility.Run<MyService>();
}
}
// Sample Service
public class MyService : TopshelfServiceBase
{
protected override void Process(CancellationToken cancellationToken)
{
// Start your service
}
}