Bot client

The final step is to create the client that we referenced in our UWP application. Let's start by creating a new project and immediately reference it from the UWP application. A .NET Standard 2.0 class library will be sufficient for what we need:

The first thing we'll need is to import two NuGet packages: the Direct Line package itself and the Rest Client Runtime:

Install-Package Microsoft.Bot.Connector.DirectLineInstall-Package Microsoft.Rest.ClientRuntime

We'll only need a single class in this project—let's call it DirectLineWrapper.

As a general principle, I always like to try to wrap external dependencies in a Wrapper Project ...

Get C# 8 and .NET Core 3 Projects Using Azure - Second Edition now with O’Reilly online learning.

O’Reilly members experience live online training, plus books, videos, and digital content from 200+ publishers.