Пример #1
0
        private static void RunAsService(string[] args)
        {
            var testService = new IgMarketDataDownloadService(args.Where(a => a != RunAsServiceFlag).ToArray());
            var serviceHost = new Win32ServiceHost(testService);

            serviceHost.Run();
        }
Пример #2
0
        private static void RunInteractive(string[] args)
        {
            var testService = new IgMarketDataDownloadService(args.Where(a => a != InteractiveFlag).ToArray());

            testService.Start(new string[0], () => { });
            Console.WriteLine("Running interactively, press enter to stop.");
            Console.ReadLine();
            testService.Stop();
        }