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 the O’Reilly learning platform.

O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.