예제 #1
0
        static void Main(string[] args)
        {
            var stopEvent = new ManualResetEvent(false);

            var service = new HostedService(HostServices.Log, stopEvent);

            service.Start();

            stopEvent.WaitOne();
        }
예제 #2
0
        static void Main(string[] args)
        {
            string instance = null;

            // an instance-name can be specified
            //
            if (args.Length == 1)
            {
                instance = args[0].Trim().ToLower();
            }

            var stopEvent = new ManualResetEvent(false);

            var service = new HostedService(HostServices.HostServices.Log, stopEvent);

            service.Start(instance);

            stopEvent.WaitOne();
        }