static void Main(string[] args) { var settings = new SelfHostSettings(CommandLineSettings.Parse(args)); var service = new KlondikeService(settings); if (settings.Interactive || Environment.UserInteractive) { Console.WriteLine("Running interactively"); service.RunInteractivley(); } else { Console.WriteLine("Running as service"); ServiceBase.Run(service); } }
public SelfHostStartup(SelfHostSettings selfHostSettings) { this.selfHostSettings = selfHostSettings; }
public KlondikeService(SelfHostSettings settings) { this.settings = settings; }