コード例 #1
0
ファイル: Program.cs プロジェクト: spgregory/BOTDevelopmentV4
        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();
        }
コード例 #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();
        }