From dbee941dcc5e5332ff02dcff01c3f4494daab8c4 Mon Sep 17 00:00:00 2001 From: Christian Kratky Date: Thu, 4 Apr 2019 22:00:40 +0200 Subject: [PATCH] Update nuget packages. --- Build/MQTTnet.nuspec | 2 +- MQTTnet.sln | 4 ++-- Source/MQTTnet.AspnetCore/MqttWebSocketServerAdapter.cs | 4 ++-- Source/MQTTnet/Formatter/MqttPacketFormatterAdapter.cs | 7 ++++++- Source/MQTTnet/MQTTnet.csproj | 8 ++------ .../MQTTnet.AspNetCore.Tests.csproj | 2 +- Tests/MQTTnet.Benchmarks/MQTTnet.Benchmarks.csproj | 2 +- Tests/MQTTnet.Core.Tests/MQTTnet.Tests.csproj | 2 +- .../MQTTnet.TestApp.UniversalWindows.csproj | 6 +++--- 9 files changed, 19 insertions(+), 18 deletions(-) diff --git a/Build/MQTTnet.nuspec b/Build/MQTTnet.nuspec index e208a6c..b7cdf14 100644 --- a/Build/MQTTnet.nuspec +++ b/Build/MQTTnet.nuspec @@ -57,7 +57,7 @@ - + diff --git a/MQTTnet.sln b/MQTTnet.sln index f2fff83..dee226d 100644 --- a/MQTTnet.sln +++ b/MQTTnet.sln @@ -1,7 +1,7 @@  Microsoft Visual Studio Solution File, Format Version 12.00 -# Visual Studio 15 -VisualStudioVersion = 15.0.27004.2010 +# Visual Studio Version 16 +VisualStudioVersion = 16.0.28729.10 MinimumVisualStudioVersion = 10.0.40219.1 Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "MQTTnet.Tests", "Tests\MQTTnet.Core.Tests\MQTTnet.Tests.csproj", "{A7FF0C91-25DE-4BA6-B39E-F54E8DADF1CC}" EndProject diff --git a/Source/MQTTnet.AspnetCore/MqttWebSocketServerAdapter.cs b/Source/MQTTnet.AspnetCore/MqttWebSocketServerAdapter.cs index 959d25a..3e5e607 100644 --- a/Source/MQTTnet.AspnetCore/MqttWebSocketServerAdapter.cs +++ b/Source/MQTTnet.AspnetCore/MqttWebSocketServerAdapter.cs @@ -44,9 +44,9 @@ namespace MQTTnet.AspNetCore clientCertificate?.Dispose(); var channel = new MqttWebSocketChannel(webSocket, endpoint, isSecureConnection); - var clientAdapter = new MqttChannelAdapter(channel, new MqttPacketFormatterAdapter(), _logger.CreateChildLogger(nameof(MqttWebSocketServerAdapter))); + var channelAdapter = new MqttChannelAdapter(channel, new MqttPacketFormatterAdapter(), _logger.CreateChildLogger(nameof(MqttWebSocketServerAdapter))); - var eventArgs = new MqttServerAdapterClientAcceptedEventArgs(clientAdapter); + var eventArgs = new MqttServerAdapterClientAcceptedEventArgs(channelAdapter); ClientAcceptedHandler?.Invoke(eventArgs); if (eventArgs.SessionTask != null) diff --git a/Source/MQTTnet/Formatter/MqttPacketFormatterAdapter.cs b/Source/MQTTnet/Formatter/MqttPacketFormatterAdapter.cs index 745c1a3..47f80db 100644 --- a/Source/MQTTnet/Formatter/MqttPacketFormatterAdapter.cs +++ b/Source/MQTTnet/Formatter/MqttPacketFormatterAdapter.cs @@ -20,19 +20,22 @@ namespace MQTTnet.Formatter UseProtocolVersion(protocolVersion); } - public MqttProtocolVersion ProtocolVersion { get; private set; } + public MqttProtocolVersion ProtocolVersion { get; private set; } = MqttProtocolVersion.Unknown; public IMqttDataConverter DataConverter { get { ThrowIfFormatterNotSet(); + return _formatter.DataConverter; } } public ArraySegment Encode(MqttBasePacket packet) { + if (packet == null) throw new ArgumentNullException(nameof(packet)); + ThrowIfFormatterNotSet(); return _formatter.Encode(packet); @@ -40,6 +43,8 @@ namespace MQTTnet.Formatter public MqttBasePacket Decode(ReceivedMqttPacket receivedMqttPacket) { + if (receivedMqttPacket == null) throw new ArgumentNullException(nameof(receivedMqttPacket)); + ThrowIfFormatterNotSet(); return _formatter.Decode(receivedMqttPacket); diff --git a/Source/MQTTnet/MQTTnet.csproj b/Source/MQTTnet/MQTTnet.csproj index d181925..5ded88e 100644 --- a/Source/MQTTnet/MQTTnet.csproj +++ b/Source/MQTTnet/MQTTnet.csproj @@ -54,7 +54,7 @@ - + @@ -62,9 +62,5 @@ - - - - - + \ No newline at end of file diff --git a/Tests/MQTTnet.AspNetCore.Tests/MQTTnet.AspNetCore.Tests.csproj b/Tests/MQTTnet.AspNetCore.Tests/MQTTnet.AspNetCore.Tests.csproj index 520c7d6..e523de5 100644 --- a/Tests/MQTTnet.AspNetCore.Tests/MQTTnet.AspNetCore.Tests.csproj +++ b/Tests/MQTTnet.AspNetCore.Tests/MQTTnet.AspNetCore.Tests.csproj @@ -7,7 +7,7 @@ - + diff --git a/Tests/MQTTnet.Benchmarks/MQTTnet.Benchmarks.csproj b/Tests/MQTTnet.Benchmarks/MQTTnet.Benchmarks.csproj index 7b632b2..02818bf 100644 --- a/Tests/MQTTnet.Benchmarks/MQTTnet.Benchmarks.csproj +++ b/Tests/MQTTnet.Benchmarks/MQTTnet.Benchmarks.csproj @@ -9,7 +9,7 @@ - + diff --git a/Tests/MQTTnet.Core.Tests/MQTTnet.Tests.csproj b/Tests/MQTTnet.Core.Tests/MQTTnet.Tests.csproj index 3d8d93e..74937a9 100644 --- a/Tests/MQTTnet.Core.Tests/MQTTnet.Tests.csproj +++ b/Tests/MQTTnet.Core.Tests/MQTTnet.Tests.csproj @@ -9,7 +9,7 @@ - + diff --git a/Tests/MQTTnet.TestApp.UniversalWindows/MQTTnet.TestApp.UniversalWindows.csproj b/Tests/MQTTnet.TestApp.UniversalWindows/MQTTnet.TestApp.UniversalWindows.csproj index f9427b6..c13db93 100644 --- a/Tests/MQTTnet.TestApp.UniversalWindows/MQTTnet.TestApp.UniversalWindows.csproj +++ b/Tests/MQTTnet.TestApp.UniversalWindows/MQTTnet.TestApp.UniversalWindows.csproj @@ -12,7 +12,7 @@ en-US UAP 10.0.17134.0 - 10.0.16299.0 + 10.0.10240.0 14 512 {A5A43C5B-DE2A-4C0C-9213-0A381AF9435A};{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC} @@ -142,10 +142,10 @@ - 6.2.2 + 6.2.8 - 5.0.0 + 4.0.0