Base class for building Windows Services, using Topshelf as a Service Host. This base class simplify building cancelable windows services.
publicstaticclassProgram{privatestaticvoidMain(){// One line main procedureTopshelfUtility.Run<MyService>();}}// Sample ServicepublicclassMyService:TopshelfServiceBase{protectedoverridevoidProcess(CancellationTokencancellationToken){// Start your service}}