diff --git a/Build/MQTTnet.AspNetCore.nuspec b/Build/MQTTnet.AspNetCore.nuspec
index 30abe1c..9f59562 100644
--- a/Build/MQTTnet.AspNetCore.nuspec
+++ b/Build/MQTTnet.AspNetCore.nuspec
@@ -23,6 +23,6 @@
-
+
\ No newline at end of file
diff --git a/Build/MQTTnet.Extensions.ManagedClient.nuspec b/Build/MQTTnet.Extensions.ManagedClient.nuspec
index 10835bf..e681554 100644
--- a/Build/MQTTnet.Extensions.ManagedClient.nuspec
+++ b/Build/MQTTnet.Extensions.ManagedClient.nuspec
@@ -38,16 +38,16 @@
-
+
-
+
-
+
-
-
+
+
\ No newline at end of file
diff --git a/Build/MQTTnet.Extensions.Rpc.nuspec b/Build/MQTTnet.Extensions.Rpc.nuspec
index f1e2d3a..f8667c4 100644
--- a/Build/MQTTnet.Extensions.Rpc.nuspec
+++ b/Build/MQTTnet.Extensions.Rpc.nuspec
@@ -38,16 +38,16 @@
-
+
-
+
-
+
-
-
+
+
\ No newline at end of file
diff --git a/Build/MQTTnet.nuspec b/Build/MQTTnet.nuspec
index 8d13023..96389fa 100644
--- a/Build/MQTTnet.nuspec
+++ b/Build/MQTTnet.nuspec
@@ -57,16 +57,16 @@
-
+
-
+
-
+
-
-
+
+
\ No newline at end of file
diff --git a/Build/build.ps1 b/Build/build.ps1
index 1009db0..59f3112 100644
--- a/Build/build.ps1
+++ b/Build/build.ps1
@@ -10,28 +10,28 @@ if ($path) {
$msbuild = join-path $path 'MSBuild\15.0\Bin\MSBuild.exe'
# Build the core library
- &$msbuild ..\Frameworks\MQTTnet.Netstandard\MQTTnet.Netstandard.csproj /t:Build /p:Configuration="Release" /p:TargetFramework="net452" /p:FileVersion=$assemblyVersion /p:AssemblyVersion=$assemblyVersion /verbosity:m /p:SignAssembly=true /p:AssemblyOriginatorKeyFile=".\..\..\Build\codeSigningKey.pfx"
- &$msbuild ..\Frameworks\MQTTnet.Netstandard\MQTTnet.Netstandard.csproj /t:Build /p:Configuration="Release" /p:TargetFramework="net461" /p:FileVersion=$assemblyVersion /p:AssemblyVersion=$assemblyVersion /verbosity:m /p:SignAssembly=true /p:AssemblyOriginatorKeyFile=".\..\..\Build\codeSigningKey.pfx"
- &$msbuild ..\Frameworks\MQTTnet.Netstandard\MQTTnet.Netstandard.csproj /t:Build /p:Configuration="Release" /p:TargetFramework="netstandard1.3" /p:FileVersion=$assemblyVersion /p:AssemblyVersion=$assemblyVersion /verbosity:m /p:SignAssembly=true /p:AssemblyOriginatorKeyFile=".\..\..\Build\codeSigningKey.pfx"
- &$msbuild ..\Frameworks\MQTTnet.Netstandard\MQTTnet.Netstandard.csproj /t:Build /p:Configuration="Release" /p:TargetFramework="netstandard2.0" /p:FileVersion=$assemblyVersion /p:AssemblyVersion=$assemblyVersion /verbosity:m /p:SignAssembly=true /p:AssemblyOriginatorKeyFile=".\..\..\Build\codeSigningKey.pfx"
- &$msbuild ..\Frameworks\MQTTnet.Netstandard\MQTTnet.Netstandard.csproj /t:Build /p:Configuration="Release" /p:TargetFramework="uap10.0" /p:FileVersion=$assemblyVersion /p:AssemblyVersion=$assemblyVersion /verbosity:m /p:SignAssembly=true /p:AssemblyOriginatorKeyFile=".\..\..\Build\codeSigningKey.pfx"
+ &$msbuild ..\Source\MQTTnet\MQTTnet.csproj /t:Build /p:Configuration="Release" /p:TargetFramework="net452" /p:FileVersion=$assemblyVersion /p:AssemblyVersion=$assemblyVersion /verbosity:m /p:SignAssembly=true /p:AssemblyOriginatorKeyFile=".\..\..\Build\codeSigningKey.pfx"
+ &$msbuild ..\Source\MQTTnet\MQTTnet.csproj /t:Build /p:Configuration="Release" /p:TargetFramework="net461" /p:FileVersion=$assemblyVersion /p:AssemblyVersion=$assemblyVersion /verbosity:m /p:SignAssembly=true /p:AssemblyOriginatorKeyFile=".\..\..\Build\codeSigningKey.pfx"
+ &$msbuild ..\Source\MQTTnet\MQTTnet.csproj /t:Build /p:Configuration="Release" /p:TargetFramework="netstandard1.3" /p:FileVersion=$assemblyVersion /p:AssemblyVersion=$assemblyVersion /verbosity:m /p:SignAssembly=true /p:AssemblyOriginatorKeyFile=".\..\..\Build\codeSigningKey.pfx"
+ &$msbuild ..\Source\MQTTnet\MQTTnet.csproj /t:Build /p:Configuration="Release" /p:TargetFramework="netstandard2.0" /p:FileVersion=$assemblyVersion /p:AssemblyVersion=$assemblyVersion /verbosity:m /p:SignAssembly=true /p:AssemblyOriginatorKeyFile=".\..\..\Build\codeSigningKey.pfx"
+ &$msbuild ..\Source\MQTTnet\MQTTnet.csproj /t:Build /p:Configuration="Release" /p:TargetFramework="uap10.0" /p:FileVersion=$assemblyVersion /p:AssemblyVersion=$assemblyVersion /verbosity:m /p:SignAssembly=true /p:AssemblyOriginatorKeyFile=".\..\..\Build\codeSigningKey.pfx"
# Build the ASP.NET Core 2.0 extension
&$msbuild ..\Frameworks\MQTTnet.AspNetCore\MQTTnet.AspNetCore.csproj /t:Build /p:Configuration="Release" /p:TargetFramework="netstandard2.0" /p:FileVersion=$assemblyVersion /p:AssemblyVersion=$assemblyVersion /verbosity:m /p:SignAssembly=true /p:AssemblyOriginatorKeyFile=".\..\..\Build\codeSigningKey.pfx"
# Build the RPC extension
- &$msbuild ..\Extensions\MQTTnet.Extensions.Rpc\MQTTnet.Extensions.Rpc.csproj /t:Build /p:Configuration="Release" /p:TargetFramework="net452" /p:FileVersion=$assemblyVersion /p:AssemblyVersion=$assemblyVersion /verbosity:m /p:SignAssembly=true /p:AssemblyOriginatorKeyFile=".\..\..\Build\codeSigningKey.pfx"
- &$msbuild ..\Extensions\MQTTnet.Extensions.Rpc\MQTTnet.Extensions.Rpc.csproj /t:Build /p:Configuration="Release" /p:TargetFramework="net461" /p:FileVersion=$assemblyVersion /p:AssemblyVersion=$assemblyVersion /verbosity:m /p:SignAssembly=true /p:AssemblyOriginatorKeyFile=".\..\..\Build\codeSigningKey.pfx"
- &$msbuild ..\Extensions\MQTTnet.Extensions.Rpc\MQTTnet.Extensions.Rpc.csproj /t:Build /p:Configuration="Release" /p:TargetFramework="netstandard1.3" /p:FileVersion=$assemblyVersion /p:AssemblyVersion=$assemblyVersion /verbosity:m /p:SignAssembly=true /p:AssemblyOriginatorKeyFile=".\..\..\Build\codeSigningKey.pfx"
- &$msbuild ..\Extensions\MQTTnet.Extensions.Rpc\MQTTnet.Extensions.Rpc.csproj /t:Build /p:Configuration="Release" /p:TargetFramework="netstandard2.0" /p:FileVersion=$assemblyVersion /p:AssemblyVersion=$assemblyVersion /verbosity:m /p:SignAssembly=true /p:AssemblyOriginatorKeyFile=".\..\..\Build\codeSigningKey.pfx"
- &$msbuild ..\Extensions\MQTTnet.Extensions.Rpc\MQTTnet.Extensions.Rpc.csproj /t:Build /p:Configuration="Release" /p:TargetFramework="uap10.0" /p:FileVersion=$assemblyVersion /p:AssemblyVersion=$assemblyVersion /verbosity:m /p:SignAssembly=true /p:AssemblyOriginatorKeyFile=".\..\..\Build\codeSigningKey.pfx"
+ &$msbuild ..\Source\MQTTnet.Extensions.Rpc\MQTTnet.Extensions.Rpc.csproj /t:Build /p:Configuration="Release" /p:TargetFramework="net452" /p:FileVersion=$assemblyVersion /p:AssemblyVersion=$assemblyVersion /verbosity:m /p:SignAssembly=true /p:AssemblyOriginatorKeyFile=".\..\..\Build\codeSigningKey.pfx"
+ &$msbuild ..\Source\MQTTnet.Extensions.Rpc\MQTTnet.Extensions.Rpc.csproj /t:Build /p:Configuration="Release" /p:TargetFramework="net461" /p:FileVersion=$assemblyVersion /p:AssemblyVersion=$assemblyVersion /verbosity:m /p:SignAssembly=true /p:AssemblyOriginatorKeyFile=".\..\..\Build\codeSigningKey.pfx"
+ &$msbuild ..\Source\MQTTnet.Extensions.Rpc\MQTTnet.Extensions.Rpc.csproj /t:Build /p:Configuration="Release" /p:TargetFramework="netstandard1.3" /p:FileVersion=$assemblyVersion /p:AssemblyVersion=$assemblyVersion /verbosity:m /p:SignAssembly=true /p:AssemblyOriginatorKeyFile=".\..\..\Build\codeSigningKey.pfx"
+ &$msbuild ..\Source\MQTTnet.Extensions.Rpc\MQTTnet.Extensions.Rpc.csproj /t:Build /p:Configuration="Release" /p:TargetFramework="netstandard2.0" /p:FileVersion=$assemblyVersion /p:AssemblyVersion=$assemblyVersion /verbosity:m /p:SignAssembly=true /p:AssemblyOriginatorKeyFile=".\..\..\Build\codeSigningKey.pfx"
+ &$msbuild ..\Source\MQTTnet.Extensions.Rpc\MQTTnet.Extensions.Rpc.csproj /t:Build /p:Configuration="Release" /p:TargetFramework="uap10.0" /p:FileVersion=$assemblyVersion /p:AssemblyVersion=$assemblyVersion /verbosity:m /p:SignAssembly=true /p:AssemblyOriginatorKeyFile=".\..\..\Build\codeSigningKey.pfx"
# Build the Managed Client extension
- &$msbuild ..\Extensions\MQTTnet.Extensions.ManagedClient\MQTTnet.Extensions.ManagedClient.csproj /t:Build /p:Configuration="Release" /p:TargetFramework="net452" /p:FileVersion=$assemblyVersion /p:AssemblyVersion=$assemblyVersion /verbosity:m /p:SignAssembly=true /p:AssemblyOriginatorKeyFile=".\..\..\Build\codeSigningKey.pfx"
- &$msbuild ..\Extensions\MQTTnet.Extensions.ManagedClient\MQTTnet.Extensions.ManagedClient.csproj /t:Build /p:Configuration="Release" /p:TargetFramework="net461" /p:FileVersion=$assemblyVersion /p:AssemblyVersion=$assemblyVersion /verbosity:m /p:SignAssembly=true /p:AssemblyOriginatorKeyFile=".\..\..\Build\codeSigningKey.pfx"
- &$msbuild ..\Extensions\MQTTnet.Extensions.ManagedClient\MQTTnet.Extensions.ManagedClient.csproj /t:Build /p:Configuration="Release" /p:TargetFramework="netstandard1.3" /p:FileVersion=$assemblyVersion /p:AssemblyVersion=$assemblyVersion /verbosity:m /p:SignAssembly=true /p:AssemblyOriginatorKeyFile=".\..\..\Build\codeSigningKey.pfx"
- &$msbuild ..\Extensions\MQTTnet.Extensions.ManagedClient\MQTTnet.Extensions.ManagedClient.csproj /t:Build /p:Configuration="Release" /p:TargetFramework="netstandard2.0" /p:FileVersion=$assemblyVersion /p:AssemblyVersion=$assemblyVersion /verbosity:m /p:SignAssembly=true /p:AssemblyOriginatorKeyFile=".\..\..\Build\codeSigningKey.pfx"
- &$msbuild ..\Extensions\MQTTnet.Extensions.ManagedClient\MQTTnet.Extensions.ManagedClient.csproj /t:Build /p:Configuration="Release" /p:TargetFramework="uap10.0" /p:FileVersion=$assemblyVersion /p:AssemblyVersion=$assemblyVersion /verbosity:m /p:SignAssembly=true /p:AssemblyOriginatorKeyFile=".\..\..\Build\codeSigningKey.pfx"
+ &$msbuild ..\Source\MQTTnet.Extensions.ManagedClient\MQTTnet.Extensions.ManagedClient.csproj /t:Build /p:Configuration="Release" /p:TargetFramework="net452" /p:FileVersion=$assemblyVersion /p:AssemblyVersion=$assemblyVersion /verbosity:m /p:SignAssembly=true /p:AssemblyOriginatorKeyFile=".\..\..\Build\codeSigningKey.pfx"
+ &$msbuild ..\Source\MQTTnet.Extensions.ManagedClient\MQTTnet.Extensions.ManagedClient.csproj /t:Build /p:Configuration="Release" /p:TargetFramework="net461" /p:FileVersion=$assemblyVersion /p:AssemblyVersion=$assemblyVersion /verbosity:m /p:SignAssembly=true /p:AssemblyOriginatorKeyFile=".\..\..\Build\codeSigningKey.pfx"
+ &$msbuild ..\Source\MQTTnet.Extensions.ManagedClient\MQTTnet.Extensions.ManagedClient.csproj /t:Build /p:Configuration="Release" /p:TargetFramework="netstandard1.3" /p:FileVersion=$assemblyVersion /p:AssemblyVersion=$assemblyVersion /verbosity:m /p:SignAssembly=true /p:AssemblyOriginatorKeyFile=".\..\..\Build\codeSigningKey.pfx"
+ &$msbuild ..\Source\MQTTnet.Extensions.ManagedClient\MQTTnet.Extensions.ManagedClient.csproj /t:Build /p:Configuration="Release" /p:TargetFramework="netstandard2.0" /p:FileVersion=$assemblyVersion /p:AssemblyVersion=$assemblyVersion /verbosity:m /p:SignAssembly=true /p:AssemblyOriginatorKeyFile=".\..\..\Build\codeSigningKey.pfx"
+ &$msbuild ..\Source\MQTTnet.Extensions.ManagedClient\MQTTnet.Extensions.ManagedClient.csproj /t:Build /p:Configuration="Release" /p:TargetFramework="uap10.0" /p:FileVersion=$assemblyVersion /p:AssemblyVersion=$assemblyVersion /verbosity:m /p:SignAssembly=true /p:AssemblyOriginatorKeyFile=".\..\..\Build\codeSigningKey.pfx"
Remove-Item .\NuGet -Force -Recurse -ErrorAction SilentlyContinue
diff --git a/MQTTnet.sln b/MQTTnet.sln
index 68a35f1..0e0e60c 100644
--- a/MQTTnet.sln
+++ b/MQTTnet.sln
@@ -7,11 +7,11 @@ Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "MQTTnet.Core.Tests", "Tests
EndProject
Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "Tests", "Tests", "{9248C2E1-B9D6-40BF-81EC-86004D7765B4}"
EndProject
-Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "Frameworks", "Frameworks", "{32A630A7-2598-41D7-B625-204CD906F5FB}"
+Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "Source", "Source", "{32A630A7-2598-41D7-B625-204CD906F5FB}"
EndProject
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "MQTTnet.TestApp.UniversalWindows", "Tests\MQTTnet.TestApp.UniversalWindows\MQTTnet.TestApp.UniversalWindows.csproj", "{FF1F72D6-9524-4422-9497-3CC0002216ED}"
EndProject
-Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "MQTTnet", "Frameworks\MQTTnet.NetStandard\MQTTnet.csproj", "{3587E506-55A2-4EB3-99C7-DC01E42D25D2}"
+Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "MQTTnet", "Source\MQTTnet\MQTTnet.csproj", "{3587E506-55A2-4EB3-99C7-DC01E42D25D2}"
EndProject
Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "Build", "Build", "{67C28AC1-BC3A-420A-BE9C-FA2401431CF9}"
ProjectSection(SolutionItems) = preProject
@@ -34,15 +34,15 @@ Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "MQTTnet.TestApp.NetCore", "
EndProject
Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "MQTTnet.TestApp.AspNetCore2", "Tests\MQTTnet.TestApp.AspNetCore2\MQTTnet.TestApp.AspNetCore2.csproj", "{C6FF8AEA-0855-41EC-A1F3-AC262225BAB9}"
EndProject
-Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "MQTTnet.AspNetCore", "Frameworks\MQTTnet.AspnetCore\MQTTnet.AspNetCore.csproj", "{F10C4060-F7EE-4A83-919F-FF723E72F94A}"
+Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "MQTTnet.AspNetCore", "Source\MQTTnet.AspnetCore\MQTTnet.AspNetCore.csproj", "{F10C4060-F7EE-4A83-919F-FF723E72F94A}"
EndProject
Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "Extensions", "Extensions", "{12816BCC-AF9E-44A9-9AE5-C246AF2A0587}"
EndProject
-Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "MQTTnet.Extensions.Rpc", "Extensions\MQTTnet.Extensions.Rpc\MQTTnet.Extensions.Rpc.csproj", "{C444E9C8-95FA-430E-9126-274129DE16CD}"
+Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "MQTTnet.Extensions.Rpc", "Source\MQTTnet.Extensions.Rpc\MQTTnet.Extensions.Rpc.csproj", "{C444E9C8-95FA-430E-9126-274129DE16CD}"
EndProject
Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "MQTTnet.Benchmarks", "Tests\MQTTnet.Benchmarks\MQTTnet.Benchmarks.csproj", "{998D04DD-7CB0-45F5-A393-E2495C16399E}"
EndProject
-Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "MQTTnet.Extensions.ManagedClient", "Extensions\MQTTnet.Extensions.ManagedClient\MQTTnet.Extensions.ManagedClient.csproj", "{C400533A-8EBA-4F0B-BF4D-295C3708604B}"
+Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "MQTTnet.Extensions.ManagedClient", "Source\MQTTnet.Extensions.ManagedClient\MQTTnet.Extensions.ManagedClient.csproj", "{C400533A-8EBA-4F0B-BF4D-295C3708604B}"
EndProject
Global
GlobalSection(SolutionConfigurationPlatforms) = preSolution
diff --git a/Frameworks/MQTTnet.AspnetCore/ApplicationBuilderExtensions.cs b/Source/MQTTnet.AspnetCore/ApplicationBuilderExtensions.cs
similarity index 100%
rename from Frameworks/MQTTnet.AspnetCore/ApplicationBuilderExtensions.cs
rename to Source/MQTTnet.AspnetCore/ApplicationBuilderExtensions.cs
diff --git a/Frameworks/MQTTnet.AspnetCore/MQTTnet.AspnetCore.csproj b/Source/MQTTnet.AspnetCore/MQTTnet.AspNetCore.csproj
similarity index 87%
rename from Frameworks/MQTTnet.AspnetCore/MQTTnet.AspnetCore.csproj
rename to Source/MQTTnet.AspnetCore/MQTTnet.AspNetCore.csproj
index 1bc391b..6b85895 100644
--- a/Frameworks/MQTTnet.AspnetCore/MQTTnet.AspnetCore.csproj
+++ b/Source/MQTTnet.AspnetCore/MQTTnet.AspNetCore.csproj
@@ -1,4 +1,4 @@
-
+
netstandard2.0
@@ -22,7 +22,7 @@
-
+
diff --git a/Frameworks/MQTTnet.AspnetCore/MqttHostedServer.cs b/Source/MQTTnet.AspnetCore/MqttHostedServer.cs
similarity index 100%
rename from Frameworks/MQTTnet.AspnetCore/MqttHostedServer.cs
rename to Source/MQTTnet.AspnetCore/MqttHostedServer.cs
diff --git a/Frameworks/MQTTnet.AspnetCore/MqttWebSocketServerAdapter.cs b/Source/MQTTnet.AspnetCore/MqttWebSocketServerAdapter.cs
similarity index 100%
rename from Frameworks/MQTTnet.AspnetCore/MqttWebSocketServerAdapter.cs
rename to Source/MQTTnet.AspnetCore/MqttWebSocketServerAdapter.cs
diff --git a/Frameworks/MQTTnet.AspnetCore/ServiceCollectionExtensions.cs b/Source/MQTTnet.AspnetCore/ServiceCollectionExtensions.cs
similarity index 100%
rename from Frameworks/MQTTnet.AspnetCore/ServiceCollectionExtensions.cs
rename to Source/MQTTnet.AspnetCore/ServiceCollectionExtensions.cs
diff --git a/Extensions/MQTTnet.Extensions.ManagedClient/ApplicationMessageProcessedEventArgs.cs b/Source/MQTTnet.Extensions.ManagedClient/ApplicationMessageProcessedEventArgs.cs
similarity index 100%
rename from Extensions/MQTTnet.Extensions.ManagedClient/ApplicationMessageProcessedEventArgs.cs
rename to Source/MQTTnet.Extensions.ManagedClient/ApplicationMessageProcessedEventArgs.cs
diff --git a/Extensions/MQTTnet.Extensions.ManagedClient/IManagedMqttClient.cs b/Source/MQTTnet.Extensions.ManagedClient/IManagedMqttClient.cs
similarity index 100%
rename from Extensions/MQTTnet.Extensions.ManagedClient/IManagedMqttClient.cs
rename to Source/MQTTnet.Extensions.ManagedClient/IManagedMqttClient.cs
diff --git a/Extensions/MQTTnet.Extensions.ManagedClient/IManagedMqttClientOptions.cs b/Source/MQTTnet.Extensions.ManagedClient/IManagedMqttClientOptions.cs
similarity index 100%
rename from Extensions/MQTTnet.Extensions.ManagedClient/IManagedMqttClientOptions.cs
rename to Source/MQTTnet.Extensions.ManagedClient/IManagedMqttClientOptions.cs
diff --git a/Extensions/MQTTnet.Extensions.ManagedClient/IManagedMqttClientStorage.cs b/Source/MQTTnet.Extensions.ManagedClient/IManagedMqttClientStorage.cs
similarity index 100%
rename from Extensions/MQTTnet.Extensions.ManagedClient/IManagedMqttClientStorage.cs
rename to Source/MQTTnet.Extensions.ManagedClient/IManagedMqttClientStorage.cs
diff --git a/Extensions/MQTTnet.Extensions.ManagedClient/MQTTnet.Extensions.ManagedClient.csproj b/Source/MQTTnet.Extensions.ManagedClient/MQTTnet.Extensions.ManagedClient.csproj
similarity index 93%
rename from Extensions/MQTTnet.Extensions.ManagedClient/MQTTnet.Extensions.ManagedClient.csproj
rename to Source/MQTTnet.Extensions.ManagedClient/MQTTnet.Extensions.ManagedClient.csproj
index 46e9a0a..3f05075 100644
--- a/Extensions/MQTTnet.Extensions.ManagedClient/MQTTnet.Extensions.ManagedClient.csproj
+++ b/Source/MQTTnet.Extensions.ManagedClient/MQTTnet.Extensions.ManagedClient.csproj
@@ -25,7 +25,7 @@
-
+
diff --git a/Extensions/MQTTnet.Extensions.ManagedClient/ManagedMqttApplicationMessage.cs b/Source/MQTTnet.Extensions.ManagedClient/ManagedMqttApplicationMessage.cs
similarity index 100%
rename from Extensions/MQTTnet.Extensions.ManagedClient/ManagedMqttApplicationMessage.cs
rename to Source/MQTTnet.Extensions.ManagedClient/ManagedMqttApplicationMessage.cs
diff --git a/Extensions/MQTTnet.Extensions.ManagedClient/ManagedMqttApplicationMessageBuilder.cs b/Source/MQTTnet.Extensions.ManagedClient/ManagedMqttApplicationMessageBuilder.cs
similarity index 100%
rename from Extensions/MQTTnet.Extensions.ManagedClient/ManagedMqttApplicationMessageBuilder.cs
rename to Source/MQTTnet.Extensions.ManagedClient/ManagedMqttApplicationMessageBuilder.cs
diff --git a/Extensions/MQTTnet.Extensions.ManagedClient/ManagedMqttClient.cs b/Source/MQTTnet.Extensions.ManagedClient/ManagedMqttClient.cs
similarity index 100%
rename from Extensions/MQTTnet.Extensions.ManagedClient/ManagedMqttClient.cs
rename to Source/MQTTnet.Extensions.ManagedClient/ManagedMqttClient.cs
diff --git a/Extensions/MQTTnet.Extensions.ManagedClient/ManagedMqttClientExtensions.cs b/Source/MQTTnet.Extensions.ManagedClient/ManagedMqttClientExtensions.cs
similarity index 100%
rename from Extensions/MQTTnet.Extensions.ManagedClient/ManagedMqttClientExtensions.cs
rename to Source/MQTTnet.Extensions.ManagedClient/ManagedMqttClientExtensions.cs
diff --git a/Extensions/MQTTnet.Extensions.ManagedClient/ManagedMqttClientOptions.cs b/Source/MQTTnet.Extensions.ManagedClient/ManagedMqttClientOptions.cs
similarity index 100%
rename from Extensions/MQTTnet.Extensions.ManagedClient/ManagedMqttClientOptions.cs
rename to Source/MQTTnet.Extensions.ManagedClient/ManagedMqttClientOptions.cs
diff --git a/Extensions/MQTTnet.Extensions.ManagedClient/ManagedMqttClientOptionsBuilder.cs b/Source/MQTTnet.Extensions.ManagedClient/ManagedMqttClientOptionsBuilder.cs
similarity index 100%
rename from Extensions/MQTTnet.Extensions.ManagedClient/ManagedMqttClientOptionsBuilder.cs
rename to Source/MQTTnet.Extensions.ManagedClient/ManagedMqttClientOptionsBuilder.cs
diff --git a/Extensions/MQTTnet.Extensions.ManagedClient/ManagedMqttClientStorageManager.cs b/Source/MQTTnet.Extensions.ManagedClient/ManagedMqttClientStorageManager.cs
similarity index 100%
rename from Extensions/MQTTnet.Extensions.ManagedClient/ManagedMqttClientStorageManager.cs
rename to Source/MQTTnet.Extensions.ManagedClient/ManagedMqttClientStorageManager.cs
diff --git a/Extensions/MQTTnet.Extensions.ManagedClient/MqttFactoryExtensions.cs b/Source/MQTTnet.Extensions.ManagedClient/MqttFactoryExtensions.cs
similarity index 100%
rename from Extensions/MQTTnet.Extensions.ManagedClient/MqttFactoryExtensions.cs
rename to Source/MQTTnet.Extensions.ManagedClient/MqttFactoryExtensions.cs
diff --git a/Extensions/MQTTnet.Extensions.ManagedClient/ReconnectionResult.cs b/Source/MQTTnet.Extensions.ManagedClient/ReconnectionResult.cs
similarity index 100%
rename from Extensions/MQTTnet.Extensions.ManagedClient/ReconnectionResult.cs
rename to Source/MQTTnet.Extensions.ManagedClient/ReconnectionResult.cs
diff --git a/Extensions/MQTTnet.Extensions.Rpc/MQTTnet.Extensions.Rpc.csproj b/Source/MQTTnet.Extensions.Rpc/MQTTnet.Extensions.Rpc.csproj
similarity index 93%
rename from Extensions/MQTTnet.Extensions.Rpc/MQTTnet.Extensions.Rpc.csproj
rename to Source/MQTTnet.Extensions.Rpc/MQTTnet.Extensions.Rpc.csproj
index 46e9a0a..3f05075 100644
--- a/Extensions/MQTTnet.Extensions.Rpc/MQTTnet.Extensions.Rpc.csproj
+++ b/Source/MQTTnet.Extensions.Rpc/MQTTnet.Extensions.Rpc.csproj
@@ -25,7 +25,7 @@
-
+
diff --git a/Extensions/MQTTnet.Extensions.Rpc/MqttRpcClient.cs b/Source/MQTTnet.Extensions.Rpc/MqttRpcClient.cs
similarity index 100%
rename from Extensions/MQTTnet.Extensions.Rpc/MqttRpcClient.cs
rename to Source/MQTTnet.Extensions.Rpc/MqttRpcClient.cs
diff --git a/Extensions/MQTTnet.Extensions.Rpc/SampleCCode.c b/Source/MQTTnet.Extensions.Rpc/SampleCCode.c
similarity index 100%
rename from Extensions/MQTTnet.Extensions.Rpc/SampleCCode.c
rename to Source/MQTTnet.Extensions.Rpc/SampleCCode.c
diff --git a/Frameworks/MQTTnet.NetStandard/Adapter/IMqttChannelAdapter.cs b/Source/MQTTnet/Adapter/IMqttChannelAdapter.cs
similarity index 100%
rename from Frameworks/MQTTnet.NetStandard/Adapter/IMqttChannelAdapter.cs
rename to Source/MQTTnet/Adapter/IMqttChannelAdapter.cs
diff --git a/Frameworks/MQTTnet.NetStandard/Adapter/IMqttServerAdapter.cs b/Source/MQTTnet/Adapter/IMqttServerAdapter.cs
similarity index 100%
rename from Frameworks/MQTTnet.NetStandard/Adapter/IMqttServerAdapter.cs
rename to Source/MQTTnet/Adapter/IMqttServerAdapter.cs
diff --git a/Frameworks/MQTTnet.NetStandard/Adapter/MqttChannelAdapter.cs b/Source/MQTTnet/Adapter/MqttChannelAdapter.cs
similarity index 100%
rename from Frameworks/MQTTnet.NetStandard/Adapter/MqttChannelAdapter.cs
rename to Source/MQTTnet/Adapter/MqttChannelAdapter.cs
diff --git a/Frameworks/MQTTnet.NetStandard/Adapter/MqttConnectingFailedException.cs b/Source/MQTTnet/Adapter/MqttConnectingFailedException.cs
similarity index 100%
rename from Frameworks/MQTTnet.NetStandard/Adapter/MqttConnectingFailedException.cs
rename to Source/MQTTnet/Adapter/MqttConnectingFailedException.cs
diff --git a/Frameworks/MQTTnet.NetStandard/Adapter/MqttServerAdapterClientAcceptedEventArgs.cs b/Source/MQTTnet/Adapter/MqttServerAdapterClientAcceptedEventArgs.cs
similarity index 100%
rename from Frameworks/MQTTnet.NetStandard/Adapter/MqttServerAdapterClientAcceptedEventArgs.cs
rename to Source/MQTTnet/Adapter/MqttServerAdapterClientAcceptedEventArgs.cs
diff --git a/Frameworks/MQTTnet.NetStandard/Adapter/ReceivedMqttPacket.cs b/Source/MQTTnet/Adapter/ReceivedMqttPacket.cs
similarity index 100%
rename from Frameworks/MQTTnet.NetStandard/Adapter/ReceivedMqttPacket.cs
rename to Source/MQTTnet/Adapter/ReceivedMqttPacket.cs
diff --git a/Frameworks/MQTTnet.NetStandard/ApplicationMessagePublisherExtensions.cs b/Source/MQTTnet/ApplicationMessagePublisherExtensions.cs
similarity index 100%
rename from Frameworks/MQTTnet.NetStandard/ApplicationMessagePublisherExtensions.cs
rename to Source/MQTTnet/ApplicationMessagePublisherExtensions.cs
diff --git a/Frameworks/MQTTnet.NetStandard/Channel/IMqttChannel.cs b/Source/MQTTnet/Channel/IMqttChannel.cs
similarity index 100%
rename from Frameworks/MQTTnet.NetStandard/Channel/IMqttChannel.cs
rename to Source/MQTTnet/Channel/IMqttChannel.cs
diff --git a/Frameworks/MQTTnet.NetStandard/Client/IMqttClient.cs b/Source/MQTTnet/Client/IMqttClient.cs
similarity index 100%
rename from Frameworks/MQTTnet.NetStandard/Client/IMqttClient.cs
rename to Source/MQTTnet/Client/IMqttClient.cs
diff --git a/Frameworks/MQTTnet.NetStandard/Client/IMqttClientAdapterFactory.cs b/Source/MQTTnet/Client/IMqttClientAdapterFactory.cs
similarity index 100%
rename from Frameworks/MQTTnet.NetStandard/Client/IMqttClientAdapterFactory.cs
rename to Source/MQTTnet/Client/IMqttClientAdapterFactory.cs
diff --git a/Frameworks/MQTTnet.NetStandard/Client/IMqttClientChannelOptions.cs b/Source/MQTTnet/Client/IMqttClientChannelOptions.cs
similarity index 100%
rename from Frameworks/MQTTnet.NetStandard/Client/IMqttClientChannelOptions.cs
rename to Source/MQTTnet/Client/IMqttClientChannelOptions.cs
diff --git a/Frameworks/MQTTnet.NetStandard/Client/IMqttClientCredentials.cs b/Source/MQTTnet/Client/IMqttClientCredentials.cs
similarity index 100%
rename from Frameworks/MQTTnet.NetStandard/Client/IMqttClientCredentials.cs
rename to Source/MQTTnet/Client/IMqttClientCredentials.cs
diff --git a/Frameworks/MQTTnet.NetStandard/Client/IMqttClientFactory.cs b/Source/MQTTnet/Client/IMqttClientFactory.cs
similarity index 100%
rename from Frameworks/MQTTnet.NetStandard/Client/IMqttClientFactory.cs
rename to Source/MQTTnet/Client/IMqttClientFactory.cs
diff --git a/Frameworks/MQTTnet.NetStandard/Client/IMqttClientOptions.cs b/Source/MQTTnet/Client/IMqttClientOptions.cs
similarity index 100%
rename from Frameworks/MQTTnet.NetStandard/Client/IMqttClientOptions.cs
rename to Source/MQTTnet/Client/IMqttClientOptions.cs
diff --git a/Frameworks/MQTTnet.NetStandard/Client/MqttClient.cs b/Source/MQTTnet/Client/MqttClient.cs
similarity index 100%
rename from Frameworks/MQTTnet.NetStandard/Client/MqttClient.cs
rename to Source/MQTTnet/Client/MqttClient.cs
diff --git a/Frameworks/MQTTnet.NetStandard/Client/MqttClientConnectResult.cs b/Source/MQTTnet/Client/MqttClientConnectResult.cs
similarity index 100%
rename from Frameworks/MQTTnet.NetStandard/Client/MqttClientConnectResult.cs
rename to Source/MQTTnet/Client/MqttClientConnectResult.cs
diff --git a/Frameworks/MQTTnet.NetStandard/Client/MqttClientConnectedEventArgs.cs b/Source/MQTTnet/Client/MqttClientConnectedEventArgs.cs
similarity index 100%
rename from Frameworks/MQTTnet.NetStandard/Client/MqttClientConnectedEventArgs.cs
rename to Source/MQTTnet/Client/MqttClientConnectedEventArgs.cs
diff --git a/Frameworks/MQTTnet.NetStandard/Client/MqttClientCredentials.cs b/Source/MQTTnet/Client/MqttClientCredentials.cs
similarity index 100%
rename from Frameworks/MQTTnet.NetStandard/Client/MqttClientCredentials.cs
rename to Source/MQTTnet/Client/MqttClientCredentials.cs
diff --git a/Frameworks/MQTTnet.NetStandard/Client/MqttClientDisconnectedEventArgs.cs b/Source/MQTTnet/Client/MqttClientDisconnectedEventArgs.cs
similarity index 100%
rename from Frameworks/MQTTnet.NetStandard/Client/MqttClientDisconnectedEventArgs.cs
rename to Source/MQTTnet/Client/MqttClientDisconnectedEventArgs.cs
diff --git a/Frameworks/MQTTnet.NetStandard/Client/MqttClientExtensions.cs b/Source/MQTTnet/Client/MqttClientExtensions.cs
similarity index 100%
rename from Frameworks/MQTTnet.NetStandard/Client/MqttClientExtensions.cs
rename to Source/MQTTnet/Client/MqttClientExtensions.cs
diff --git a/Frameworks/MQTTnet.NetStandard/Client/MqttClientOptions.cs b/Source/MQTTnet/Client/MqttClientOptions.cs
similarity index 100%
rename from Frameworks/MQTTnet.NetStandard/Client/MqttClientOptions.cs
rename to Source/MQTTnet/Client/MqttClientOptions.cs
diff --git a/Frameworks/MQTTnet.NetStandard/Client/MqttClientOptionsBuilder.cs b/Source/MQTTnet/Client/MqttClientOptionsBuilder.cs
similarity index 100%
rename from Frameworks/MQTTnet.NetStandard/Client/MqttClientOptionsBuilder.cs
rename to Source/MQTTnet/Client/MqttClientOptionsBuilder.cs
diff --git a/Frameworks/MQTTnet.NetStandard/Client/MqttClientTcpOptions.cs b/Source/MQTTnet/Client/MqttClientTcpOptions.cs
similarity index 100%
rename from Frameworks/MQTTnet.NetStandard/Client/MqttClientTcpOptions.cs
rename to Source/MQTTnet/Client/MqttClientTcpOptions.cs
diff --git a/Frameworks/MQTTnet.NetStandard/Client/MqttClientTcpOptionsExtensions.cs b/Source/MQTTnet/Client/MqttClientTcpOptionsExtensions.cs
similarity index 100%
rename from Frameworks/MQTTnet.NetStandard/Client/MqttClientTcpOptionsExtensions.cs
rename to Source/MQTTnet/Client/MqttClientTcpOptionsExtensions.cs
diff --git a/Frameworks/MQTTnet.NetStandard/Client/MqttClientTlsOptions.cs b/Source/MQTTnet/Client/MqttClientTlsOptions.cs
similarity index 58%
rename from Frameworks/MQTTnet.NetStandard/Client/MqttClientTlsOptions.cs
rename to Source/MQTTnet/Client/MqttClientTlsOptions.cs
index 6478b26..2536b23 100644
--- a/Frameworks/MQTTnet.NetStandard/Client/MqttClientTlsOptions.cs
+++ b/Source/MQTTnet/Client/MqttClientTlsOptions.cs
@@ -1,4 +1,7 @@
-using System.Collections.Generic;
+using System;
+using System.Collections.Generic;
+using System.Net.Security;
+using System.Security.Cryptography.X509Certificates;
namespace MQTTnet.Client
{
@@ -13,5 +16,7 @@ namespace MQTTnet.Client
public bool AllowUntrustedCertificates { get; set; }
public List Certificates { get; set; }
+
+ public Func CertificateValidationCallback { get; set; }
}
}
diff --git a/Frameworks/MQTTnet.NetStandard/Client/MqttClientWebSocketOptions.cs b/Source/MQTTnet/Client/MqttClientWebSocketOptions.cs
similarity index 100%
rename from Frameworks/MQTTnet.NetStandard/Client/MqttClientWebSocketOptions.cs
rename to Source/MQTTnet/Client/MqttClientWebSocketOptions.cs
diff --git a/Frameworks/MQTTnet.NetStandard/Client/MqttPacketDispatcher.cs b/Source/MQTTnet/Client/MqttPacketDispatcher.cs
similarity index 100%
rename from Frameworks/MQTTnet.NetStandard/Client/MqttPacketDispatcher.cs
rename to Source/MQTTnet/Client/MqttPacketDispatcher.cs
diff --git a/Frameworks/MQTTnet.NetStandard/Client/MqttPacketIdentifierProvider.cs b/Source/MQTTnet/Client/MqttPacketIdentifierProvider.cs
similarity index 100%
rename from Frameworks/MQTTnet.NetStandard/Client/MqttPacketIdentifierProvider.cs
rename to Source/MQTTnet/Client/MqttPacketIdentifierProvider.cs
diff --git a/Frameworks/MQTTnet.NetStandard/Client/MqttSubscribeResult.cs b/Source/MQTTnet/Client/MqttSubscribeResult.cs
similarity index 100%
rename from Frameworks/MQTTnet.NetStandard/Client/MqttSubscribeResult.cs
rename to Source/MQTTnet/Client/MqttSubscribeResult.cs
diff --git a/Frameworks/MQTTnet.NetStandard/Diagnostics/IMqttNetChildLogger.cs b/Source/MQTTnet/Diagnostics/IMqttNetChildLogger.cs
similarity index 100%
rename from Frameworks/MQTTnet.NetStandard/Diagnostics/IMqttNetChildLogger.cs
rename to Source/MQTTnet/Diagnostics/IMqttNetChildLogger.cs
diff --git a/Frameworks/MQTTnet.NetStandard/Diagnostics/IMqttNetLogger.cs b/Source/MQTTnet/Diagnostics/IMqttNetLogger.cs
similarity index 100%
rename from Frameworks/MQTTnet.NetStandard/Diagnostics/IMqttNetLogger.cs
rename to Source/MQTTnet/Diagnostics/IMqttNetLogger.cs
diff --git a/Frameworks/MQTTnet.NetStandard/Diagnostics/MqttNetChildLogger.cs b/Source/MQTTnet/Diagnostics/MqttNetChildLogger.cs
similarity index 100%
rename from Frameworks/MQTTnet.NetStandard/Diagnostics/MqttNetChildLogger.cs
rename to Source/MQTTnet/Diagnostics/MqttNetChildLogger.cs
diff --git a/Frameworks/MQTTnet.NetStandard/Diagnostics/MqttNetGlobalLogger.cs b/Source/MQTTnet/Diagnostics/MqttNetGlobalLogger.cs
similarity index 100%
rename from Frameworks/MQTTnet.NetStandard/Diagnostics/MqttNetGlobalLogger.cs
rename to Source/MQTTnet/Diagnostics/MqttNetGlobalLogger.cs
diff --git a/Frameworks/MQTTnet.NetStandard/Diagnostics/MqttNetLogLevel.cs b/Source/MQTTnet/Diagnostics/MqttNetLogLevel.cs
similarity index 100%
rename from Frameworks/MQTTnet.NetStandard/Diagnostics/MqttNetLogLevel.cs
rename to Source/MQTTnet/Diagnostics/MqttNetLogLevel.cs
diff --git a/Frameworks/MQTTnet.NetStandard/Diagnostics/MqttNetLogMessage.cs b/Source/MQTTnet/Diagnostics/MqttNetLogMessage.cs
similarity index 100%
rename from Frameworks/MQTTnet.NetStandard/Diagnostics/MqttNetLogMessage.cs
rename to Source/MQTTnet/Diagnostics/MqttNetLogMessage.cs
diff --git a/Frameworks/MQTTnet.NetStandard/Diagnostics/MqttNetLogMessagePublishedEventArgs.cs b/Source/MQTTnet/Diagnostics/MqttNetLogMessagePublishedEventArgs.cs
similarity index 100%
rename from Frameworks/MQTTnet.NetStandard/Diagnostics/MqttNetLogMessagePublishedEventArgs.cs
rename to Source/MQTTnet/Diagnostics/MqttNetLogMessagePublishedEventArgs.cs
diff --git a/Frameworks/MQTTnet.NetStandard/Diagnostics/MqttNetLogger.cs b/Source/MQTTnet/Diagnostics/MqttNetLogger.cs
similarity index 100%
rename from Frameworks/MQTTnet.NetStandard/Diagnostics/MqttNetLogger.cs
rename to Source/MQTTnet/Diagnostics/MqttNetLogger.cs
diff --git a/Frameworks/MQTTnet.NetStandard/Diagnostics/TargetFrameworkInfoProvider.cs b/Source/MQTTnet/Diagnostics/TargetFrameworkInfoProvider.cs
similarity index 100%
rename from Frameworks/MQTTnet.NetStandard/Diagnostics/TargetFrameworkInfoProvider.cs
rename to Source/MQTTnet/Diagnostics/TargetFrameworkInfoProvider.cs
diff --git a/Frameworks/MQTTnet.NetStandard/Exceptions/MqttCommunicationException.cs b/Source/MQTTnet/Exceptions/MqttCommunicationException.cs
similarity index 100%
rename from Frameworks/MQTTnet.NetStandard/Exceptions/MqttCommunicationException.cs
rename to Source/MQTTnet/Exceptions/MqttCommunicationException.cs
diff --git a/Frameworks/MQTTnet.NetStandard/Exceptions/MqttCommunicationTimedOutException.cs b/Source/MQTTnet/Exceptions/MqttCommunicationTimedOutException.cs
similarity index 100%
rename from Frameworks/MQTTnet.NetStandard/Exceptions/MqttCommunicationTimedOutException.cs
rename to Source/MQTTnet/Exceptions/MqttCommunicationTimedOutException.cs
diff --git a/Frameworks/MQTTnet.NetStandard/Exceptions/MqttProtocolViolationException.cs b/Source/MQTTnet/Exceptions/MqttProtocolViolationException.cs
similarity index 100%
rename from Frameworks/MQTTnet.NetStandard/Exceptions/MqttProtocolViolationException.cs
rename to Source/MQTTnet/Exceptions/MqttProtocolViolationException.cs
diff --git a/Frameworks/MQTTnet.NetStandard/IApplicationMessagePublisher.cs b/Source/MQTTnet/IApplicationMessagePublisher.cs
similarity index 100%
rename from Frameworks/MQTTnet.NetStandard/IApplicationMessagePublisher.cs
rename to Source/MQTTnet/IApplicationMessagePublisher.cs
diff --git a/Frameworks/MQTTnet.NetStandard/IApplicationMessageReceiver.cs b/Source/MQTTnet/IApplicationMessageReceiver.cs
similarity index 100%
rename from Frameworks/MQTTnet.NetStandard/IApplicationMessageReceiver.cs
rename to Source/MQTTnet/IApplicationMessageReceiver.cs
diff --git a/Frameworks/MQTTnet.NetStandard/Implementations/MqttClientAdapterFactory.cs b/Source/MQTTnet/Implementations/MqttClientAdapterFactory.cs
similarity index 91%
rename from Frameworks/MQTTnet.NetStandard/Implementations/MqttClientAdapterFactory.cs
rename to Source/MQTTnet/Implementations/MqttClientAdapterFactory.cs
index 5256da3..dd06c31 100644
--- a/Frameworks/MQTTnet.NetStandard/Implementations/MqttClientAdapterFactory.cs
+++ b/Source/MQTTnet/Implementations/MqttClientAdapterFactory.cs
@@ -16,9 +16,9 @@ namespace MQTTnet.Implementations
switch (options.ChannelOptions)
{
- case MqttClientTcpOptions tcpOptions:
+ case MqttClientTcpOptions _:
{
- return new MqttChannelAdapter(new MqttTcpChannel(tcpOptions), serializer, logger);
+ return new MqttChannelAdapter(new MqttTcpChannel(options), serializer, logger);
}
case MqttClientWebSocketOptions webSocketOptions:
diff --git a/Frameworks/MQTTnet.NetStandard/Implementations/MqttTcpChannel.Uwp.cs b/Source/MQTTnet/Implementations/MqttTcpChannel.Uwp.cs
similarity index 89%
rename from Frameworks/MQTTnet.NetStandard/Implementations/MqttTcpChannel.Uwp.cs
rename to Source/MQTTnet/Implementations/MqttTcpChannel.Uwp.cs
index e8406d3..d7a030a 100644
--- a/Frameworks/MQTTnet.NetStandard/Implementations/MqttTcpChannel.Uwp.cs
+++ b/Source/MQTTnet/Implementations/MqttTcpChannel.Uwp.cs
@@ -11,32 +11,29 @@ using Windows.Networking.Sockets;
using Windows.Security.Cryptography.Certificates;
using MQTTnet.Channel;
using MQTTnet.Client;
+using MQTTnet.Server;
namespace MQTTnet.Implementations
{
public class MqttTcpChannel : IMqttChannel
{
- // ReSharper disable once MemberCanBePrivate.Global
- // ReSharper disable once AutoPropertyCanBeMadeGetOnly.Global
- public static int BufferSize { get; set; } = 4096; // Can be changed for fine tuning by library user.
-
- private readonly int _bufferSize = BufferSize;
private readonly MqttClientTcpOptions _options;
+ private readonly int _bufferSize;
private StreamSocket _socket;
private Stream _readStream;
private Stream _writeStream;
- public MqttTcpChannel(MqttClientTcpOptions options)
+ public MqttTcpChannel(IMqttClientOptions clientOptions)
{
- _options = options ?? throw new ArgumentNullException(nameof(options));
-
- _bufferSize = options.BufferSize;
+ _options = (MqttClientTcpOptions)clientOptions.ChannelOptions;
+ _bufferSize = _options.BufferSize;
}
- public MqttTcpChannel(StreamSocket socket)
+ public MqttTcpChannel(StreamSocket socket, IMqttServerOptions serverOptions)
{
_socket = socket ?? throw new ArgumentNullException(nameof(socket));
+ _bufferSize = serverOptions.DefaultEndpointOptions.BufferSize;
CreateStreams();
}
@@ -97,7 +94,7 @@ namespace MQTTnet.Implementations
TryDispose(_socket, () => _socket = null);
}
- private static Certificate LoadCertificate(MqttClientTcpOptions options)
+ private static Certificate LoadCertificate(IMqttClientChannelOptions options)
{
if (options.TlsOptions.Certificates == null || !options.TlsOptions.Certificates.Any())
{
diff --git a/Frameworks/MQTTnet.NetStandard/Implementations/MqttTcpChannel.cs b/Source/MQTTnet/Implementations/MqttTcpChannel.cs
similarity index 88%
rename from Frameworks/MQTTnet.NetStandard/Implementations/MqttTcpChannel.cs
rename to Source/MQTTnet/Implementations/MqttTcpChannel.cs
index 7e4148f..20829be 100644
--- a/Frameworks/MQTTnet.NetStandard/Implementations/MqttTcpChannel.cs
+++ b/Source/MQTTnet/Implementations/MqttTcpChannel.cs
@@ -15,17 +15,19 @@ namespace MQTTnet.Implementations
{
public class MqttTcpChannel : IMqttChannel
{
+ private readonly IMqttClientOptions _clientOptions;
private readonly MqttClientTcpOptions _options;
-
+
private Socket _socket;
private Stream _stream;
///
/// called on client sockets are created in connect
///
- public MqttTcpChannel(MqttClientTcpOptions options)
+ public MqttTcpChannel(IMqttClientOptions clientOptions)
{
- _options = options ?? throw new ArgumentNullException(nameof(options));
+ _clientOptions = clientOptions ?? throw new ArgumentNullException(nameof(clientOptions));
+ _options = (MqttClientTcpOptions)clientOptions.ChannelOptions;
}
///
@@ -39,6 +41,7 @@ namespace MQTTnet.Implementations
CreateStream(sslStream);
}
+ [Obsolete("There is a new callback at the TLS options. This one will be deleted soon.")]
public static Func CustomCertificateValidationCallback { get; set; }
public string Endpoint => _socket?.RemoteEndPoint?.ToString();
@@ -90,6 +93,13 @@ namespace MQTTnet.Implementations
private bool InternalUserCertificateValidationCallback(object sender, X509Certificate x509Certificate, X509Chain chain, SslPolicyErrors sslPolicyErrors)
{
+ // Try the instance callback.
+ if (_options.TlsOptions.CertificateValidationCallback != null)
+ {
+ return _options.TlsOptions.CertificateValidationCallback(x509Certificate, chain, sslPolicyErrors,_clientOptions);
+ }
+
+ // Try static callback.
if (CustomCertificateValidationCallback != null)
{
return CustomCertificateValidationCallback(x509Certificate, chain, sslPolicyErrors, _options);
diff --git a/Frameworks/MQTTnet.NetStandard/Implementations/MqttTcpServerAdapter.Uwp.cs b/Source/MQTTnet/Implementations/MqttTcpServerAdapter.Uwp.cs
similarity index 62%
rename from Frameworks/MQTTnet.NetStandard/Implementations/MqttTcpServerAdapter.Uwp.cs
rename to Source/MQTTnet/Implementations/MqttTcpServerAdapter.Uwp.cs
index 26759b2..c42db2b 100644
--- a/Frameworks/MQTTnet.NetStandard/Implementations/MqttTcpServerAdapter.Uwp.cs
+++ b/Source/MQTTnet/Implementations/MqttTcpServerAdapter.Uwp.cs
@@ -12,7 +12,9 @@ namespace MQTTnet.Implementations
public class MqttTcpServerAdapter : IMqttServerAdapter
{
private readonly IMqttNetChildLogger _logger;
- private StreamSocketListener _defaultEndpointSocket;
+
+ private IMqttServerOptions _options;
+ private StreamSocketListener _listener;
public MqttTcpServerAdapter(IMqttNetChildLogger logger)
{
@@ -25,22 +27,21 @@ namespace MQTTnet.Implementations
public async Task StartAsync(IMqttServerOptions options)
{
- if (options == null) throw new ArgumentNullException(nameof(options));
+ _options = options ?? throw new ArgumentNullException(nameof(options));
- if (_defaultEndpointSocket != null) throw new InvalidOperationException("Server is already started.");
+ if (_listener != null) throw new InvalidOperationException("Server is already started.");
if (options.DefaultEndpointOptions.IsEnabled)
{
- _defaultEndpointSocket = new StreamSocketListener();
+ _listener = new StreamSocketListener();
// This also affects the client sockets.
- _defaultEndpointSocket.Control.NoDelay = true;
- _defaultEndpointSocket.Control.KeepAlive = true;
- _defaultEndpointSocket.Control.QualityOfService = SocketQualityOfService.LowLatency;
- _defaultEndpointSocket.ConnectionReceived += AcceptDefaultEndpointConnectionsAsync;
-
- await _defaultEndpointSocket.BindServiceNameAsync(options.DefaultEndpointOptions.Port.ToString(), SocketProtectionLevel.PlainSocket);
+ _listener.Control.NoDelay = true;
+ _listener.Control.KeepAlive = true;
+ _listener.Control.QualityOfService = SocketQualityOfService.LowLatency;
+ _listener.ConnectionReceived += AcceptDefaultEndpointConnectionsAsync;
+ await _listener.BindServiceNameAsync(options.DefaultEndpointOptions.Port.ToString(), SocketProtectionLevel.PlainSocket);
}
if (options.TlsEndpointOptions.IsEnabled)
@@ -51,13 +52,13 @@ namespace MQTTnet.Implementations
public Task StopAsync()
{
- if (_defaultEndpointSocket != null)
+ if (_listener != null)
{
- _defaultEndpointSocket.ConnectionReceived -= AcceptDefaultEndpointConnectionsAsync;
+ _listener.ConnectionReceived -= AcceptDefaultEndpointConnectionsAsync;
}
- _defaultEndpointSocket?.Dispose();
- _defaultEndpointSocket = null;
+ _listener?.Dispose();
+ _listener = null;
return Task.FromResult(0);
}
@@ -71,7 +72,7 @@ namespace MQTTnet.Implementations
{
try
{
- var clientAdapter = new MqttChannelAdapter(new MqttTcpChannel(args.Socket), new MqttPacketSerializer(), _logger);
+ var clientAdapter = new MqttChannelAdapter(new MqttTcpChannel(args.Socket, _options), new MqttPacketSerializer(), _logger);
ClientAccepted?.Invoke(this, new MqttServerAdapterClientAcceptedEventArgs(clientAdapter));
}
catch (Exception exception)
diff --git a/Frameworks/MQTTnet.NetStandard/Implementations/MqttTcpServerAdapter.cs b/Source/MQTTnet/Implementations/MqttTcpServerAdapter.cs
similarity index 100%
rename from Frameworks/MQTTnet.NetStandard/Implementations/MqttTcpServerAdapter.cs
rename to Source/MQTTnet/Implementations/MqttTcpServerAdapter.cs
diff --git a/Frameworks/MQTTnet.NetStandard/Implementations/MqttTcpServerListener.cs b/Source/MQTTnet/Implementations/MqttTcpServerListener.cs
similarity index 100%
rename from Frameworks/MQTTnet.NetStandard/Implementations/MqttTcpServerListener.cs
rename to Source/MQTTnet/Implementations/MqttTcpServerListener.cs
diff --git a/Frameworks/MQTTnet.NetStandard/Implementations/MqttWebSocketChannel.cs b/Source/MQTTnet/Implementations/MqttWebSocketChannel.cs
similarity index 100%
rename from Frameworks/MQTTnet.NetStandard/Implementations/MqttWebSocketChannel.cs
rename to Source/MQTTnet/Implementations/MqttWebSocketChannel.cs
diff --git a/Frameworks/MQTTnet.NetStandard/Internal/AsyncAutoResetEvent.cs b/Source/MQTTnet/Internal/AsyncAutoResetEvent.cs
similarity index 100%
rename from Frameworks/MQTTnet.NetStandard/Internal/AsyncAutoResetEvent.cs
rename to Source/MQTTnet/Internal/AsyncAutoResetEvent.cs
diff --git a/Frameworks/MQTTnet.NetStandard/Internal/AsyncLock.cs b/Source/MQTTnet/Internal/AsyncLock.cs
similarity index 100%
rename from Frameworks/MQTTnet.NetStandard/Internal/AsyncLock.cs
rename to Source/MQTTnet/Internal/AsyncLock.cs
diff --git a/Frameworks/MQTTnet.NetStandard/Internal/ExceptionHelper.cs b/Source/MQTTnet/Internal/ExceptionHelper.cs
similarity index 100%
rename from Frameworks/MQTTnet.NetStandard/Internal/ExceptionHelper.cs
rename to Source/MQTTnet/Internal/ExceptionHelper.cs
diff --git a/Frameworks/MQTTnet.NetStandard/Internal/MqttApplicationMessageExtensions.cs b/Source/MQTTnet/Internal/MqttApplicationMessageExtensions.cs
similarity index 100%
rename from Frameworks/MQTTnet.NetStandard/Internal/MqttApplicationMessageExtensions.cs
rename to Source/MQTTnet/Internal/MqttApplicationMessageExtensions.cs
diff --git a/Frameworks/MQTTnet.NetStandard/Internal/TaskExtensions.cs b/Source/MQTTnet/Internal/TaskExtensions.cs
similarity index 100%
rename from Frameworks/MQTTnet.NetStandard/Internal/TaskExtensions.cs
rename to Source/MQTTnet/Internal/TaskExtensions.cs
diff --git a/Frameworks/MQTTnet.NetStandard/Internal/TestMqttChannel.cs b/Source/MQTTnet/Internal/TestMqttChannel.cs
similarity index 100%
rename from Frameworks/MQTTnet.NetStandard/Internal/TestMqttChannel.cs
rename to Source/MQTTnet/Internal/TestMqttChannel.cs
diff --git a/Frameworks/MQTTnet.NetStandard/MQTTnet.csproj b/Source/MQTTnet/MQTTnet.csproj
similarity index 100%
rename from Frameworks/MQTTnet.NetStandard/MQTTnet.csproj
rename to Source/MQTTnet/MQTTnet.csproj
diff --git a/Frameworks/MQTTnet.NetStandard/MqttApplicationMessage.cs b/Source/MQTTnet/MqttApplicationMessage.cs
similarity index 100%
rename from Frameworks/MQTTnet.NetStandard/MqttApplicationMessage.cs
rename to Source/MQTTnet/MqttApplicationMessage.cs
diff --git a/Frameworks/MQTTnet.NetStandard/MqttApplicationMessageBuilder.cs b/Source/MQTTnet/MqttApplicationMessageBuilder.cs
similarity index 100%
rename from Frameworks/MQTTnet.NetStandard/MqttApplicationMessageBuilder.cs
rename to Source/MQTTnet/MqttApplicationMessageBuilder.cs
diff --git a/Frameworks/MQTTnet.NetStandard/MqttApplicationMessageExtensions.cs b/Source/MQTTnet/MqttApplicationMessageExtensions.cs
similarity index 100%
rename from Frameworks/MQTTnet.NetStandard/MqttApplicationMessageExtensions.cs
rename to Source/MQTTnet/MqttApplicationMessageExtensions.cs
diff --git a/Frameworks/MQTTnet.NetStandard/MqttApplicationMessageReceivedEventArgs.cs b/Source/MQTTnet/MqttApplicationMessageReceivedEventArgs.cs
similarity index 100%
rename from Frameworks/MQTTnet.NetStandard/MqttApplicationMessageReceivedEventArgs.cs
rename to Source/MQTTnet/MqttApplicationMessageReceivedEventArgs.cs
diff --git a/Frameworks/MQTTnet.NetStandard/MqttFactory.cs b/Source/MQTTnet/MqttFactory.cs
similarity index 100%
rename from Frameworks/MQTTnet.NetStandard/MqttFactory.cs
rename to Source/MQTTnet/MqttFactory.cs
diff --git a/Frameworks/MQTTnet.NetStandard/Packets/IMqttPacketWithIdentifier.cs b/Source/MQTTnet/Packets/IMqttPacketWithIdentifier.cs
similarity index 100%
rename from Frameworks/MQTTnet.NetStandard/Packets/IMqttPacketWithIdentifier.cs
rename to Source/MQTTnet/Packets/IMqttPacketWithIdentifier.cs
diff --git a/Frameworks/MQTTnet.NetStandard/Packets/MqttBasePacket.cs b/Source/MQTTnet/Packets/MqttBasePacket.cs
similarity index 100%
rename from Frameworks/MQTTnet.NetStandard/Packets/MqttBasePacket.cs
rename to Source/MQTTnet/Packets/MqttBasePacket.cs
diff --git a/Frameworks/MQTTnet.NetStandard/Packets/MqttBasePublishPacket.cs b/Source/MQTTnet/Packets/MqttBasePublishPacket.cs
similarity index 100%
rename from Frameworks/MQTTnet.NetStandard/Packets/MqttBasePublishPacket.cs
rename to Source/MQTTnet/Packets/MqttBasePublishPacket.cs
diff --git a/Frameworks/MQTTnet.NetStandard/Packets/MqttConnAckPacket.cs b/Source/MQTTnet/Packets/MqttConnAckPacket.cs
similarity index 100%
rename from Frameworks/MQTTnet.NetStandard/Packets/MqttConnAckPacket.cs
rename to Source/MQTTnet/Packets/MqttConnAckPacket.cs
diff --git a/Frameworks/MQTTnet.NetStandard/Packets/MqttConnectPacket.cs b/Source/MQTTnet/Packets/MqttConnectPacket.cs
similarity index 100%
rename from Frameworks/MQTTnet.NetStandard/Packets/MqttConnectPacket.cs
rename to Source/MQTTnet/Packets/MqttConnectPacket.cs
diff --git a/Frameworks/MQTTnet.NetStandard/Packets/MqttDisconnectPacket.cs b/Source/MQTTnet/Packets/MqttDisconnectPacket.cs
similarity index 100%
rename from Frameworks/MQTTnet.NetStandard/Packets/MqttDisconnectPacket.cs
rename to Source/MQTTnet/Packets/MqttDisconnectPacket.cs
diff --git a/Frameworks/MQTTnet.NetStandard/Packets/MqttPingReqPacket.cs b/Source/MQTTnet/Packets/MqttPingReqPacket.cs
similarity index 100%
rename from Frameworks/MQTTnet.NetStandard/Packets/MqttPingReqPacket.cs
rename to Source/MQTTnet/Packets/MqttPingReqPacket.cs
diff --git a/Frameworks/MQTTnet.NetStandard/Packets/MqttPingRespPacket.cs b/Source/MQTTnet/Packets/MqttPingRespPacket.cs
similarity index 100%
rename from Frameworks/MQTTnet.NetStandard/Packets/MqttPingRespPacket.cs
rename to Source/MQTTnet/Packets/MqttPingRespPacket.cs
diff --git a/Frameworks/MQTTnet.NetStandard/Packets/MqttPubAckPacket.cs b/Source/MQTTnet/Packets/MqttPubAckPacket.cs
similarity index 100%
rename from Frameworks/MQTTnet.NetStandard/Packets/MqttPubAckPacket.cs
rename to Source/MQTTnet/Packets/MqttPubAckPacket.cs
diff --git a/Frameworks/MQTTnet.NetStandard/Packets/MqttPubCompPacket.cs b/Source/MQTTnet/Packets/MqttPubCompPacket.cs
similarity index 100%
rename from Frameworks/MQTTnet.NetStandard/Packets/MqttPubCompPacket.cs
rename to Source/MQTTnet/Packets/MqttPubCompPacket.cs
diff --git a/Frameworks/MQTTnet.NetStandard/Packets/MqttPubRecPacket.cs b/Source/MQTTnet/Packets/MqttPubRecPacket.cs
similarity index 100%
rename from Frameworks/MQTTnet.NetStandard/Packets/MqttPubRecPacket.cs
rename to Source/MQTTnet/Packets/MqttPubRecPacket.cs
diff --git a/Frameworks/MQTTnet.NetStandard/Packets/MqttPubRelPacket.cs b/Source/MQTTnet/Packets/MqttPubRelPacket.cs
similarity index 100%
rename from Frameworks/MQTTnet.NetStandard/Packets/MqttPubRelPacket.cs
rename to Source/MQTTnet/Packets/MqttPubRelPacket.cs
diff --git a/Frameworks/MQTTnet.NetStandard/Packets/MqttPublishPacket.cs b/Source/MQTTnet/Packets/MqttPublishPacket.cs
similarity index 100%
rename from Frameworks/MQTTnet.NetStandard/Packets/MqttPublishPacket.cs
rename to Source/MQTTnet/Packets/MqttPublishPacket.cs
diff --git a/Frameworks/MQTTnet.NetStandard/Packets/MqttSubAckPacket.cs b/Source/MQTTnet/Packets/MqttSubAckPacket.cs
similarity index 100%
rename from Frameworks/MQTTnet.NetStandard/Packets/MqttSubAckPacket.cs
rename to Source/MQTTnet/Packets/MqttSubAckPacket.cs
diff --git a/Frameworks/MQTTnet.NetStandard/Packets/MqttSubscribePacket.cs b/Source/MQTTnet/Packets/MqttSubscribePacket.cs
similarity index 100%
rename from Frameworks/MQTTnet.NetStandard/Packets/MqttSubscribePacket.cs
rename to Source/MQTTnet/Packets/MqttSubscribePacket.cs
diff --git a/Frameworks/MQTTnet.NetStandard/Packets/MqttUnsubAckPacket.cs b/Source/MQTTnet/Packets/MqttUnsubAckPacket.cs
similarity index 100%
rename from Frameworks/MQTTnet.NetStandard/Packets/MqttUnsubAckPacket.cs
rename to Source/MQTTnet/Packets/MqttUnsubAckPacket.cs
diff --git a/Frameworks/MQTTnet.NetStandard/Packets/MqttUnsubscribe.cs b/Source/MQTTnet/Packets/MqttUnsubscribe.cs
similarity index 100%
rename from Frameworks/MQTTnet.NetStandard/Packets/MqttUnsubscribe.cs
rename to Source/MQTTnet/Packets/MqttUnsubscribe.cs
diff --git a/Frameworks/MQTTnet.NetStandard/Protocol/MqttConnectReturnCode.cs b/Source/MQTTnet/Protocol/MqttConnectReturnCode.cs
similarity index 100%
rename from Frameworks/MQTTnet.NetStandard/Protocol/MqttConnectReturnCode.cs
rename to Source/MQTTnet/Protocol/MqttConnectReturnCode.cs
diff --git a/Frameworks/MQTTnet.NetStandard/Protocol/MqttControlPacketType.cs b/Source/MQTTnet/Protocol/MqttControlPacketType.cs
similarity index 100%
rename from Frameworks/MQTTnet.NetStandard/Protocol/MqttControlPacketType.cs
rename to Source/MQTTnet/Protocol/MqttControlPacketType.cs
diff --git a/Frameworks/MQTTnet.NetStandard/Protocol/MqttQualityOfServiceLevel.cs b/Source/MQTTnet/Protocol/MqttQualityOfServiceLevel.cs
similarity index 100%
rename from Frameworks/MQTTnet.NetStandard/Protocol/MqttQualityOfServiceLevel.cs
rename to Source/MQTTnet/Protocol/MqttQualityOfServiceLevel.cs
diff --git a/Frameworks/MQTTnet.NetStandard/Protocol/MqttSubscribeReturnCode.cs b/Source/MQTTnet/Protocol/MqttSubscribeReturnCode.cs
similarity index 100%
rename from Frameworks/MQTTnet.NetStandard/Protocol/MqttSubscribeReturnCode.cs
rename to Source/MQTTnet/Protocol/MqttSubscribeReturnCode.cs
diff --git a/Frameworks/MQTTnet.NetStandard/Serializer/ByteReader.cs b/Source/MQTTnet/Serializer/ByteReader.cs
similarity index 100%
rename from Frameworks/MQTTnet.NetStandard/Serializer/ByteReader.cs
rename to Source/MQTTnet/Serializer/ByteReader.cs
diff --git a/Frameworks/MQTTnet.NetStandard/Serializer/ByteWriter.cs b/Source/MQTTnet/Serializer/ByteWriter.cs
similarity index 100%
rename from Frameworks/MQTTnet.NetStandard/Serializer/ByteWriter.cs
rename to Source/MQTTnet/Serializer/ByteWriter.cs
diff --git a/Frameworks/MQTTnet.NetStandard/Serializer/Extensions.cs b/Source/MQTTnet/Serializer/Extensions.cs
similarity index 100%
rename from Frameworks/MQTTnet.NetStandard/Serializer/Extensions.cs
rename to Source/MQTTnet/Serializer/Extensions.cs
diff --git a/Frameworks/MQTTnet.NetStandard/Serializer/IMqttPacketSerializer.cs b/Source/MQTTnet/Serializer/IMqttPacketSerializer.cs
similarity index 100%
rename from Frameworks/MQTTnet.NetStandard/Serializer/IMqttPacketSerializer.cs
rename to Source/MQTTnet/Serializer/IMqttPacketSerializer.cs
diff --git a/Frameworks/MQTTnet.NetStandard/Serializer/MqttFixedHeader.cs b/Source/MQTTnet/Serializer/MqttFixedHeader.cs
similarity index 100%
rename from Frameworks/MQTTnet.NetStandard/Serializer/MqttFixedHeader.cs
rename to Source/MQTTnet/Serializer/MqttFixedHeader.cs
diff --git a/Frameworks/MQTTnet.NetStandard/Serializer/MqttPacketBodyReader.cs b/Source/MQTTnet/Serializer/MqttPacketBodyReader.cs
similarity index 100%
rename from Frameworks/MQTTnet.NetStandard/Serializer/MqttPacketBodyReader.cs
rename to Source/MQTTnet/Serializer/MqttPacketBodyReader.cs
diff --git a/Frameworks/MQTTnet.NetStandard/Serializer/MqttPacketReader.cs b/Source/MQTTnet/Serializer/MqttPacketReader.cs
similarity index 100%
rename from Frameworks/MQTTnet.NetStandard/Serializer/MqttPacketReader.cs
rename to Source/MQTTnet/Serializer/MqttPacketReader.cs
diff --git a/Frameworks/MQTTnet.NetStandard/Serializer/MqttPacketSerializer.cs b/Source/MQTTnet/Serializer/MqttPacketSerializer.cs
similarity index 100%
rename from Frameworks/MQTTnet.NetStandard/Serializer/MqttPacketSerializer.cs
rename to Source/MQTTnet/Serializer/MqttPacketSerializer.cs
diff --git a/Frameworks/MQTTnet.NetStandard/Serializer/MqttPacketWriter.cs b/Source/MQTTnet/Serializer/MqttPacketWriter.cs
similarity index 100%
rename from Frameworks/MQTTnet.NetStandard/Serializer/MqttPacketWriter.cs
rename to Source/MQTTnet/Serializer/MqttPacketWriter.cs
diff --git a/Frameworks/MQTTnet.NetStandard/Serializer/MqttProtocolVersion.cs b/Source/MQTTnet/Serializer/MqttProtocolVersion.cs
similarity index 100%
rename from Frameworks/MQTTnet.NetStandard/Serializer/MqttProtocolVersion.cs
rename to Source/MQTTnet/Serializer/MqttProtocolVersion.cs
diff --git a/Frameworks/MQTTnet.NetStandard/Server/CheckSubscriptionsResult.cs b/Source/MQTTnet/Server/CheckSubscriptionsResult.cs
similarity index 100%
rename from Frameworks/MQTTnet.NetStandard/Server/CheckSubscriptionsResult.cs
rename to Source/MQTTnet/Server/CheckSubscriptionsResult.cs
diff --git a/Frameworks/MQTTnet.NetStandard/Server/GetOrCreateClientSessionResult.cs b/Source/MQTTnet/Server/GetOrCreateClientSessionResult.cs
similarity index 100%
rename from Frameworks/MQTTnet.NetStandard/Server/GetOrCreateClientSessionResult.cs
rename to Source/MQTTnet/Server/GetOrCreateClientSessionResult.cs
diff --git a/Frameworks/MQTTnet.NetStandard/Server/IMqttClientSessionStatus.cs b/Source/MQTTnet/Server/IMqttClientSessionStatus.cs
similarity index 100%
rename from Frameworks/MQTTnet.NetStandard/Server/IMqttClientSessionStatus.cs
rename to Source/MQTTnet/Server/IMqttClientSessionStatus.cs
diff --git a/Frameworks/MQTTnet.NetStandard/Server/IMqttServer.cs b/Source/MQTTnet/Server/IMqttServer.cs
similarity index 100%
rename from Frameworks/MQTTnet.NetStandard/Server/IMqttServer.cs
rename to Source/MQTTnet/Server/IMqttServer.cs
diff --git a/Frameworks/MQTTnet.NetStandard/Server/IMqttServerFactory.cs b/Source/MQTTnet/Server/IMqttServerFactory.cs
similarity index 100%
rename from Frameworks/MQTTnet.NetStandard/Server/IMqttServerFactory.cs
rename to Source/MQTTnet/Server/IMqttServerFactory.cs
diff --git a/Frameworks/MQTTnet.NetStandard/Server/IMqttServerOptions.cs b/Source/MQTTnet/Server/IMqttServerOptions.cs
similarity index 100%
rename from Frameworks/MQTTnet.NetStandard/Server/IMqttServerOptions.cs
rename to Source/MQTTnet/Server/IMqttServerOptions.cs
diff --git a/Frameworks/MQTTnet.NetStandard/Server/IMqttServerStorage.cs b/Source/MQTTnet/Server/IMqttServerStorage.cs
similarity index 100%
rename from Frameworks/MQTTnet.NetStandard/Server/IMqttServerStorage.cs
rename to Source/MQTTnet/Server/IMqttServerStorage.cs
diff --git a/Frameworks/MQTTnet.NetStandard/Server/MqttApplicationMessageInterceptorContext.cs b/Source/MQTTnet/Server/MqttApplicationMessageInterceptorContext.cs
similarity index 100%
rename from Frameworks/MQTTnet.NetStandard/Server/MqttApplicationMessageInterceptorContext.cs
rename to Source/MQTTnet/Server/MqttApplicationMessageInterceptorContext.cs
diff --git a/Frameworks/MQTTnet.NetStandard/Server/MqttClientConnectedEventArgs.cs b/Source/MQTTnet/Server/MqttClientConnectedEventArgs.cs
similarity index 100%
rename from Frameworks/MQTTnet.NetStandard/Server/MqttClientConnectedEventArgs.cs
rename to Source/MQTTnet/Server/MqttClientConnectedEventArgs.cs
diff --git a/Frameworks/MQTTnet.NetStandard/Server/MqttClientDisconnectType.cs b/Source/MQTTnet/Server/MqttClientDisconnectType.cs
similarity index 100%
rename from Frameworks/MQTTnet.NetStandard/Server/MqttClientDisconnectType.cs
rename to Source/MQTTnet/Server/MqttClientDisconnectType.cs
diff --git a/Frameworks/MQTTnet.NetStandard/Server/MqttClientDisconnectedEventArgs.cs b/Source/MQTTnet/Server/MqttClientDisconnectedEventArgs.cs
similarity index 100%
rename from Frameworks/MQTTnet.NetStandard/Server/MqttClientDisconnectedEventArgs.cs
rename to Source/MQTTnet/Server/MqttClientDisconnectedEventArgs.cs
diff --git a/Frameworks/MQTTnet.NetStandard/Server/MqttClientKeepAliveMonitor.cs b/Source/MQTTnet/Server/MqttClientKeepAliveMonitor.cs
similarity index 100%
rename from Frameworks/MQTTnet.NetStandard/Server/MqttClientKeepAliveMonitor.cs
rename to Source/MQTTnet/Server/MqttClientKeepAliveMonitor.cs
diff --git a/Frameworks/MQTTnet.NetStandard/Server/MqttClientMessageQueueInterceptorContext.cs b/Source/MQTTnet/Server/MqttClientMessageQueueInterceptorContext.cs
similarity index 100%
rename from Frameworks/MQTTnet.NetStandard/Server/MqttClientMessageQueueInterceptorContext.cs
rename to Source/MQTTnet/Server/MqttClientMessageQueueInterceptorContext.cs
diff --git a/Frameworks/MQTTnet.NetStandard/Server/MqttClientPendingMessagesQueue.cs b/Source/MQTTnet/Server/MqttClientPendingMessagesQueue.cs
similarity index 100%
rename from Frameworks/MQTTnet.NetStandard/Server/MqttClientPendingMessagesQueue.cs
rename to Source/MQTTnet/Server/MqttClientPendingMessagesQueue.cs
diff --git a/Frameworks/MQTTnet.NetStandard/Server/MqttClientSession.cs b/Source/MQTTnet/Server/MqttClientSession.cs
similarity index 100%
rename from Frameworks/MQTTnet.NetStandard/Server/MqttClientSession.cs
rename to Source/MQTTnet/Server/MqttClientSession.cs
diff --git a/Frameworks/MQTTnet.NetStandard/Server/MqttClientSessionStatus.cs b/Source/MQTTnet/Server/MqttClientSessionStatus.cs
similarity index 100%
rename from Frameworks/MQTTnet.NetStandard/Server/MqttClientSessionStatus.cs
rename to Source/MQTTnet/Server/MqttClientSessionStatus.cs
diff --git a/Frameworks/MQTTnet.NetStandard/Server/MqttClientSessionsManager.cs b/Source/MQTTnet/Server/MqttClientSessionsManager.cs
similarity index 100%
rename from Frameworks/MQTTnet.NetStandard/Server/MqttClientSessionsManager.cs
rename to Source/MQTTnet/Server/MqttClientSessionsManager.cs
diff --git a/Frameworks/MQTTnet.NetStandard/Server/MqttClientSubscribeResult.cs b/Source/MQTTnet/Server/MqttClientSubscribeResult.cs
similarity index 100%
rename from Frameworks/MQTTnet.NetStandard/Server/MqttClientSubscribeResult.cs
rename to Source/MQTTnet/Server/MqttClientSubscribeResult.cs
diff --git a/Frameworks/MQTTnet.NetStandard/Server/MqttClientSubscribedTopicEventArgs.cs b/Source/MQTTnet/Server/MqttClientSubscribedTopicEventArgs.cs
similarity index 100%
rename from Frameworks/MQTTnet.NetStandard/Server/MqttClientSubscribedTopicEventArgs.cs
rename to Source/MQTTnet/Server/MqttClientSubscribedTopicEventArgs.cs
diff --git a/Frameworks/MQTTnet.NetStandard/Server/MqttClientSubscriptionsManager.cs b/Source/MQTTnet/Server/MqttClientSubscriptionsManager.cs
similarity index 100%
rename from Frameworks/MQTTnet.NetStandard/Server/MqttClientSubscriptionsManager.cs
rename to Source/MQTTnet/Server/MqttClientSubscriptionsManager.cs
diff --git a/Frameworks/MQTTnet.NetStandard/Server/MqttClientUnSubscribedTopicEventArgs.cs b/Source/MQTTnet/Server/MqttClientUnSubscribedTopicEventArgs.cs
similarity index 100%
rename from Frameworks/MQTTnet.NetStandard/Server/MqttClientUnSubscribedTopicEventArgs.cs
rename to Source/MQTTnet/Server/MqttClientUnSubscribedTopicEventArgs.cs
diff --git a/Frameworks/MQTTnet.NetStandard/Server/MqttConnectionValidatorContext.cs b/Source/MQTTnet/Server/MqttConnectionValidatorContext.cs
similarity index 100%
rename from Frameworks/MQTTnet.NetStandard/Server/MqttConnectionValidatorContext.cs
rename to Source/MQTTnet/Server/MqttConnectionValidatorContext.cs
diff --git a/Frameworks/MQTTnet.NetStandard/Server/MqttPendingMessagesOverflowStrategy.cs b/Source/MQTTnet/Server/MqttPendingMessagesOverflowStrategy.cs
similarity index 100%
rename from Frameworks/MQTTnet.NetStandard/Server/MqttPendingMessagesOverflowStrategy.cs
rename to Source/MQTTnet/Server/MqttPendingMessagesOverflowStrategy.cs
diff --git a/Frameworks/MQTTnet.NetStandard/Server/MqttRetainedMessagesManager.cs b/Source/MQTTnet/Server/MqttRetainedMessagesManager.cs
similarity index 100%
rename from Frameworks/MQTTnet.NetStandard/Server/MqttRetainedMessagesManager.cs
rename to Source/MQTTnet/Server/MqttRetainedMessagesManager.cs
diff --git a/Frameworks/MQTTnet.NetStandard/Server/MqttServer.cs b/Source/MQTTnet/Server/MqttServer.cs
similarity index 100%
rename from Frameworks/MQTTnet.NetStandard/Server/MqttServer.cs
rename to Source/MQTTnet/Server/MqttServer.cs
diff --git a/Frameworks/MQTTnet.NetStandard/Server/MqttServerOptions.cs b/Source/MQTTnet/Server/MqttServerOptions.cs
similarity index 100%
rename from Frameworks/MQTTnet.NetStandard/Server/MqttServerOptions.cs
rename to Source/MQTTnet/Server/MqttServerOptions.cs
diff --git a/Frameworks/MQTTnet.NetStandard/Server/MqttServerOptionsBuilder.cs b/Source/MQTTnet/Server/MqttServerOptionsBuilder.cs
similarity index 100%
rename from Frameworks/MQTTnet.NetStandard/Server/MqttServerOptionsBuilder.cs
rename to Source/MQTTnet/Server/MqttServerOptionsBuilder.cs
diff --git a/Frameworks/MQTTnet.NetStandard/Server/MqttServerTcpEndpointBaseOptions.cs b/Source/MQTTnet/Server/MqttServerTcpEndpointBaseOptions.cs
similarity index 84%
rename from Frameworks/MQTTnet.NetStandard/Server/MqttServerTcpEndpointBaseOptions.cs
rename to Source/MQTTnet/Server/MqttServerTcpEndpointBaseOptions.cs
index 8ef8d41..45df278 100644
--- a/Frameworks/MQTTnet.NetStandard/Server/MqttServerTcpEndpointBaseOptions.cs
+++ b/Source/MQTTnet/Server/MqttServerTcpEndpointBaseOptions.cs
@@ -10,6 +10,10 @@ namespace MQTTnet.Server
public int ConnectionBacklog { get; set; } = 10;
+#if WINDOWS_UWP
+ public int BufferSize { get; set; } = 4096;
+#endif
+
public IPAddress BoundInterNetworkAddress { get; set; } = IPAddress.Any;
public IPAddress BoundInterNetworkV6Address { get; set; } = IPAddress.IPv6Any;
diff --git a/Frameworks/MQTTnet.NetStandard/Server/MqttServerTcpEndpointOptions.cs b/Source/MQTTnet/Server/MqttServerTcpEndpointOptions.cs
similarity index 100%
rename from Frameworks/MQTTnet.NetStandard/Server/MqttServerTcpEndpointOptions.cs
rename to Source/MQTTnet/Server/MqttServerTcpEndpointOptions.cs
diff --git a/Frameworks/MQTTnet.NetStandard/Server/MqttServerTlsTcpEndpointOptions.cs b/Source/MQTTnet/Server/MqttServerTlsTcpEndpointOptions.cs
similarity index 100%
rename from Frameworks/MQTTnet.NetStandard/Server/MqttServerTlsTcpEndpointOptions.cs
rename to Source/MQTTnet/Server/MqttServerTlsTcpEndpointOptions.cs
diff --git a/Frameworks/MQTTnet.NetStandard/Server/MqttSubscribeResult.cs b/Source/MQTTnet/Server/MqttSubscribeResult.cs
similarity index 100%
rename from Frameworks/MQTTnet.NetStandard/Server/MqttSubscribeResult.cs
rename to Source/MQTTnet/Server/MqttSubscribeResult.cs
diff --git a/Frameworks/MQTTnet.NetStandard/Server/MqttSubscriptionInterceptorContext.cs b/Source/MQTTnet/Server/MqttSubscriptionInterceptorContext.cs
similarity index 100%
rename from Frameworks/MQTTnet.NetStandard/Server/MqttSubscriptionInterceptorContext.cs
rename to Source/MQTTnet/Server/MqttSubscriptionInterceptorContext.cs
diff --git a/Frameworks/MQTTnet.NetStandard/Server/MqttTopicFilterComparer.cs b/Source/MQTTnet/Server/MqttTopicFilterComparer.cs
similarity index 100%
rename from Frameworks/MQTTnet.NetStandard/Server/MqttTopicFilterComparer.cs
rename to Source/MQTTnet/Server/MqttTopicFilterComparer.cs
diff --git a/Frameworks/MQTTnet.NetStandard/TopicFilter.cs b/Source/MQTTnet/TopicFilter.cs
similarity index 100%
rename from Frameworks/MQTTnet.NetStandard/TopicFilter.cs
rename to Source/MQTTnet/TopicFilter.cs
diff --git a/Frameworks/MQTTnet.NetStandard/TopicFilterBuilder.cs b/Source/MQTTnet/TopicFilterBuilder.cs
similarity index 100%
rename from Frameworks/MQTTnet.NetStandard/TopicFilterBuilder.cs
rename to Source/MQTTnet/TopicFilterBuilder.cs
diff --git a/Frameworks/MQTTnet.NetStandard/codeSigningKey.pfx b/Source/MQTTnet/codeSigningKey.pfx
similarity index 100%
rename from Frameworks/MQTTnet.NetStandard/codeSigningKey.pfx
rename to Source/MQTTnet/codeSigningKey.pfx
diff --git a/Tests/MQTTnet.Benchmarks/MQTTnet.Benchmarks.csproj b/Tests/MQTTnet.Benchmarks/MQTTnet.Benchmarks.csproj
index 4db064f..5e612fb 100644
--- a/Tests/MQTTnet.Benchmarks/MQTTnet.Benchmarks.csproj
+++ b/Tests/MQTTnet.Benchmarks/MQTTnet.Benchmarks.csproj
@@ -13,7 +13,7 @@
-
+
\ No newline at end of file
diff --git a/Tests/MQTTnet.Benchmarks/MqttTcpChannelBenchmark.cs b/Tests/MQTTnet.Benchmarks/MqttTcpChannelBenchmark.cs
index 740b83e..1f29c97 100644
--- a/Tests/MQTTnet.Benchmarks/MqttTcpChannelBenchmark.cs
+++ b/Tests/MQTTnet.Benchmarks/MqttTcpChannelBenchmark.cs
@@ -14,8 +14,6 @@ namespace MQTTnet.Benchmarks
{
private IMqttServer _mqttServer;
private IMqttChannel _serverChannel;
-
-
private IMqttChannel _clientChannel;
[GlobalSetup]
@@ -23,7 +21,7 @@ namespace MQTTnet.Benchmarks
{
var factory = new MqttFactory();
var tcpServer = new MqttTcpServerAdapter(new MqttNetLogger().CreateChildLogger());
- tcpServer.ClientAccepted += (sender, args) => _serverChannel = (IMqttChannel)args.Client.GetType().GetField("_channel", System.Reflection.BindingFlags.NonPublic| System.Reflection.BindingFlags.Instance).GetValue(args.Client);
+ tcpServer.ClientAccepted += (sender, args) => _serverChannel = (IMqttChannel)args.Client.GetType().GetField("_channel", System.Reflection.BindingFlags.NonPublic | System.Reflection.BindingFlags.Instance).GetValue(args.Client);
_mqttServer = factory.CreateMqttServer(new[] { tcpServer }, new MqttNetLogger());
@@ -33,8 +31,8 @@ namespace MQTTnet.Benchmarks
var clientOptions = new MqttClientOptionsBuilder()
.WithTcpServer("localhost").Build();
- var tcpOptions = (MqttClientTcpOptions) clientOptions.ChannelOptions;
- _clientChannel = new MqttTcpChannel(tcpOptions);
+ var tcpOptions = (MqttClientTcpOptions)clientOptions.ChannelOptions;
+ _clientChannel = new MqttTcpChannel(new MqttClientOptions { ChannelOptions = tcpOptions });
_clientChannel.ConnectAsync(CancellationToken.None).GetAwaiter().GetResult();
}
@@ -65,7 +63,7 @@ namespace MQTTnet.Benchmarks
private async Task WriteAsync(int iterations, int size)
{
await Task.Yield();
-
+
for (var i = 0; i < iterations; i++)
{
await _serverChannel.WriteAsync(new byte[size], 0, size, CancellationToken.None).ConfigureAwait(false);
diff --git a/Tests/MQTTnet.Core.Tests/MQTTnet.Core.Tests.csproj b/Tests/MQTTnet.Core.Tests/MQTTnet.Core.Tests.csproj
index 52e3326..40697e9 100644
--- a/Tests/MQTTnet.Core.Tests/MQTTnet.Core.Tests.csproj
+++ b/Tests/MQTTnet.Core.Tests/MQTTnet.Core.Tests.csproj
@@ -13,7 +13,7 @@
-
+
\ No newline at end of file
diff --git a/Tests/MQTTnet.TestApp.AspNetCore2/MQTTnet.TestApp.AspNetCore2.csproj b/Tests/MQTTnet.TestApp.AspNetCore2/MQTTnet.TestApp.AspNetCore2.csproj
index cd38d16..c587ecc 100644
--- a/Tests/MQTTnet.TestApp.AspNetCore2/MQTTnet.TestApp.AspNetCore2.csproj
+++ b/Tests/MQTTnet.TestApp.AspNetCore2/MQTTnet.TestApp.AspNetCore2.csproj
@@ -1,4 +1,4 @@
-
+
netcoreapp2.0
@@ -14,7 +14,8 @@
-
+
+
diff --git a/Tests/MQTTnet.TestApp.NetCore/MQTTnet.TestApp.NetCore.csproj b/Tests/MQTTnet.TestApp.NetCore/MQTTnet.TestApp.NetCore.csproj
index 5050163..2a738a0 100644
--- a/Tests/MQTTnet.TestApp.NetCore/MQTTnet.TestApp.NetCore.csproj
+++ b/Tests/MQTTnet.TestApp.NetCore/MQTTnet.TestApp.NetCore.csproj
@@ -1,4 +1,4 @@
-
+
Exe
@@ -15,8 +15,8 @@
-
-
+
+
diff --git a/Tests/MQTTnet.TestApp.UniversalWindows/MQTTnet.TestApp.UniversalWindows.csproj b/Tests/MQTTnet.TestApp.UniversalWindows/MQTTnet.TestApp.UniversalWindows.csproj
index 0b6cad8..d709083 100644
--- a/Tests/MQTTnet.TestApp.UniversalWindows/MQTTnet.TestApp.UniversalWindows.csproj
+++ b/Tests/MQTTnet.TestApp.UniversalWindows/MQTTnet.TestApp.UniversalWindows.csproj
@@ -127,15 +127,15 @@
-
+
{C400533A-8EBA-4F0B-BF4D-295C3708604B}
MQTTnet.Extensions.ManagedClient
-
+
{c444e9c8-95fa-430e-9126-274129de16cd}
MQTTnet.Extensions.Rpc
-
+
{3587e506-55a2-4eb3-99c7-dc01e42d25d2}
MQTTnet