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 SelfHostSettings(CommandLineSettings commandLineSettings) : base(prefix: "") { this.commandLineSettings = commandLineSettings; this.virtualPathUtility = new SelfHostVirtualPathUtility(BaseDirectory, VirtualPathRoot); }