Exemplo n.º 1
0
 protected override void OnStart(string[] args)
 {
     if (_Host == null)
     {
         _Host = new WorkerHost();
     }
     _Host.Start();
     if (_TriggerHost == null)
     {
         _TriggerHost = new TriggerHost();
     }
     _TriggerHost.Start();
 }
Exemplo n.º 2
0
        private static void Work([CLAP.Description("worker to start, or none to start all")] string worker)
        {
            var host = new WorkerHost();

            host.Start(worker);
            var triggerHost = new TriggerHost();

            triggerHost.Start();
            Console.WriteLine();
            Console.WriteLine("PRESS ANY KEY TO STOP");
            Console.WriteLine();
            Console.ReadKey(true);
            host.Stop();
            triggerHost.Stop();
            Console.WriteLine("Goodbye!");
        }