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(); }
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(); }