Beispiel #1
0
        static void Main(string[] args)
        {
            var config = new SentConfig(LogManager.GetCurrentClassLogger());
            var bot    = new TelegramBot();
            var parser = new NewsParser(bot, config);

            while (true)
            {
                try
                {
                    parser.Parse();
                }
                catch (Exception e)
                {
                    Console.WriteLine(e);
                }
                Thread.Sleep(TimeSpan.FromSeconds(60));
            }
        }
Beispiel #2
0
        static async Task Main(string[] args)
        {
            var config = new SentConfig(LogManager.GetCurrentClassLogger());
            var bot    = new TelegramBot();
            var parser = new NewsParser(bot, config);

            while (true)
            {
                try
                {
                    await parser.Parse();
                }
                catch (Exception e)
                {
                    Console.WriteLine(e);
                }
                await Task.Delay(TimeSpan.FromSeconds(60));
            }
        }