Esempio n. 1
0
        public static void Main(string[] args)
        {
            Console.WriteLine("Welcome to the EchoBot.");

            var adapter = new ConsoleAdapter();                            
            adapter.ProcessActivity(async (context) =>
            {
                var echoBot = new EchoBot();
                await echoBot.OnTurn(context);
            }).Wait();
        }
Esempio n. 2
0
        public static void Main(string[] args)
        {
            Console.WriteLine("Welcome to the EchoBot.");

            var adapter = new ConsoleAdapter()
                          .Use(new ConversationState <EchoState>(new MemoryStorage()));

            adapter.ProcessActivity(async(context) =>
            {
                var echoBot = new EchoBot(new MyService());

                await echoBot.OnReceiveActivity(context);
            }).Wait();
        }