protected override void OnStart(string[] args) { if (_Host == null) { _Host = new WorkerHost(); } _Host.Start(); }
private static void Work([CLAP.Description("worker to start, or none to start all")]string worker) { var host = new WorkerHost(); host.Start(worker); Console.WriteLine(); Console.WriteLine("PRESS ANY KEY TO STOP"); Console.WriteLine(); Console.ReadKey(true); host.Stop(); Console.WriteLine("Goodbye!"); }