예제 #1
0
        private static void Main()
        {
            bool debug = IsDebugMode();

            if (debug)
            {
                Debugger.Launch();
            }


            using (RssService rssService = GetService())
            {
                if (IsConsoleMode())
                {
                    rssService.Open();

                    ConsoleKeyInfo info = Console.ReadKey(true);
                    while (info.Key != ConsoleKey.Enter)
                    {
                        info = Console.ReadKey(true);
                    }

                    rssService.Close();
                }
                else
                {
                    ServiceBase.Run(rssService);
                }
            }
        }