Archiving the chat

To save the chat history to a text file, enter a valid local folder path in the archivePath input element and hit the Archive Chat button:

As mentioned earlier, we haven't built in proper validation for our path, so make sure you test it using a valid path. If successful, you should see a message in the chat window like this:

system: Chat archived by John Doe

You will also find the newly created text file in the specified path with the ChatArchive_[date].txt naming convention.

Get C# 7 and .NET Core 2.0 Blueprints 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.