static void Main(string[] args) { #if DEBUG var app = new ShamefulOldGitApp(); app.Start(null); Console.ReadKey(); #else HostFactory.Run(x => { x.Service(s => new ShamefulOldGitApp()); x.RunAsLocalSystem(); x.RunAsLocalService(); x.StartAutomatically(); x.SetServiceName("ShamefulOldGit"); x.SetDisplayName("ShamefulOldGit"); x.SetDescription("Shaming old git commits."); }); #endif }
static void Main(string[] args) { #if DEBUG var app = new ShamefulOldGitApp(); app.Start(null); Console.ReadKey(); #else HostFactory.Run(x => { x.Service(s => new ShamefulOldGitApp()); x.RunAsLocalSystem(); x.RunAsLocalService(); x.StartAutomatically(); x.SetServiceName("ShamefulOldGit"); x.SetDisplayName("ShamefulOldGit"); x.SetDescription("Shaming old git commits."); }); #endif }