Пример #1
0
        static void Main(string[] args)
        {
            Telegram.ITelegramAPI api = new Telegram.TelegramAPI(HiddenAuth.get_auth(), HiddenAuth.get_chatid());

            IEventHandler teleGramHandler = new Telegram.TelegramEventHandler(api);
            IEventStream dummyStream = new MockAPIStream(new List<IEventHandler>() { teleGramHandler });
            IMonitor monitor = new Monitor(dummyStream);

            monitor.set_off();
        }
Пример #2
0
        static void Main(string[] args)
        {
            Telegram.ITelegramAPI api = new Telegram.TelegramAPI(HiddenAuth.get_auth(), HiddenAuth.get_chatid());

            IEventHandler teleGramHandler = new Telegram.TelegramEventHandler(api);
            IEventStream  dummyStream     = new MockAPIStream(new List <IEventHandler>()
            {
                teleGramHandler
            });
            IMonitor monitor = new Monitor(dummyStream);

            monitor.set_off();
        }