private static void RunAsService() { //var servicesToRun = new ServiceBase[] { new ShipServicesHost() }; //ServiceBase.Run(servicesToRun); var service = new TaskService(); Run(service); }
private static void RunAsConsole(string[] args) { //var x = new ShipServicesHost(); //x.Start(args); var service = new TaskService(); service.OnStart(null); Console.ReadLine(); }