Geeks With Blogs
.Nettuce Code Salad May 2013 Entries
Windows Service Template
static class Program { static void Main(string[] args) { var serviceRunner = new ServiceRunner(); if (Environment.UserInteractive) { serviceRunner.Run(args); serviceRunner.Stop(); } else { var servicesToRun = new ServiceBase[] { new Service(serviceRunner) }; ServiceBase.Run(servicesToR... } } } class ServiceRunner { public void Run(string[] args) { } public void Stop() { } } class Service : ServiceBase { readonly ServiceRunner serviceRunner; public Service(ServiceRunner serviceRunner) { this.serviceRunner ......

Posted On Wednesday, May 29, 2013 2:48 PM

Copyright © Jon Canning | Powered by: GeeksWithBlogs.net