Expose more properties of the connection validator context in MQTTnet.Server. Migrate return code to reason code.

This commit is contained in:
Christian Kratky
2019-06-14 20:38:07 +02:00
parent bd665c3d56
commit 0c7a5a992b
9 changed files with 73 additions and 36 deletions
@@ -0,0 +1,24 @@
using System;
using System.IO;
namespace MQTTnet.Server.Configuration
{
public static class PathHelper
{
public static string ExpandPath(string path)
{
if (path == null)
{
return null;
}
var uri = new Uri(path, UriKind.RelativeOrAbsolute);
if (!uri.IsAbsoluteUri)
{
return Path.Combine(AppDomain.CurrentDomain.BaseDirectory, path);
}
return path;
}
}
}