December 2019
Intermediate to advanced
528 pages
11h 19m
English
Ultimately, the purpose of this entire application is to send a message to our bot and print the reply on the screen. The next thing that we're going to introduce is a wrapper class to do just that. We'll fill in the actual class code later in the chapter, but here, we're just going to use the class as though it does everything we need. Let's start by declaring it as a class-level variable:
BotClientSdk.DirectLineWrapper _wrapper = null;
Now, we'll instantiate this in the constructor, which should now look like this:
public MainViewModel() { SendMessageCommand = new RelayCommandAsync<string>(SendMessage); _wrapper = new BotClientSdk.DirectLineWrapper(PopulateHistory); }
You'll notice that we're passing a variable into the ...