From c7c84ad39b8a78e2d18a3e3742cf3b095d8ee618 Mon Sep 17 00:00:00 2001 From: Christian Date: Sun, 21 Jan 2018 14:10:23 +0100 Subject: [PATCH] Make clients interfaces disposable. --- Frameworks/MQTTnet.NetStandard/Client/IMqttClient.cs | 2 +- Frameworks/MQTTnet.NetStandard/Client/MqttClient.cs | 2 +- .../MQTTnet.NetStandard/ManagedClient/IManagedMqttClient.cs | 2 +- .../MQTTnet.NetStandard/ManagedClient/ManagedMqttClient.cs | 2 +- 4 files changed, 4 insertions(+), 4 deletions(-) diff --git a/Frameworks/MQTTnet.NetStandard/Client/IMqttClient.cs b/Frameworks/MQTTnet.NetStandard/Client/IMqttClient.cs index 42ca0a4..40d1a48 100644 --- a/Frameworks/MQTTnet.NetStandard/Client/IMqttClient.cs +++ b/Frameworks/MQTTnet.NetStandard/Client/IMqttClient.cs @@ -4,7 +4,7 @@ using System.Threading.Tasks; namespace MQTTnet.Client { - public interface IMqttClient : IApplicationMessageReceiver, IApplicationMessagePublisher + public interface IMqttClient : IApplicationMessageReceiver, IApplicationMessagePublisher, IDisposable { bool IsConnected { get; } diff --git a/Frameworks/MQTTnet.NetStandard/Client/MqttClient.cs b/Frameworks/MQTTnet.NetStandard/Client/MqttClient.cs index 9625808..7834816 100644 --- a/Frameworks/MQTTnet.NetStandard/Client/MqttClient.cs +++ b/Frameworks/MQTTnet.NetStandard/Client/MqttClient.cs @@ -12,7 +12,7 @@ using MQTTnet.Protocol; namespace MQTTnet.Client { - public class MqttClient : IMqttClient, IDisposable + public class MqttClient : IMqttClient { private readonly IMqttClientAdapterFactory _adapterFactory; private readonly MqttPacketDispatcher _packetDispatcher; diff --git a/Frameworks/MQTTnet.NetStandard/ManagedClient/IManagedMqttClient.cs b/Frameworks/MQTTnet.NetStandard/ManagedClient/IManagedMqttClient.cs index 2475959..9d67908 100644 --- a/Frameworks/MQTTnet.NetStandard/ManagedClient/IManagedMqttClient.cs +++ b/Frameworks/MQTTnet.NetStandard/ManagedClient/IManagedMqttClient.cs @@ -5,7 +5,7 @@ using MQTTnet.Client; namespace MQTTnet.ManagedClient { - public interface IManagedMqttClient : IApplicationMessageReceiver, IApplicationMessagePublisher + public interface IManagedMqttClient : IApplicationMessageReceiver, IApplicationMessagePublisher, IDisposable { bool IsConnected { get; } diff --git a/Frameworks/MQTTnet.NetStandard/ManagedClient/ManagedMqttClient.cs b/Frameworks/MQTTnet.NetStandard/ManagedClient/ManagedMqttClient.cs index 01fa4cd..a7f5a1c 100644 --- a/Frameworks/MQTTnet.NetStandard/ManagedClient/ManagedMqttClient.cs +++ b/Frameworks/MQTTnet.NetStandard/ManagedClient/ManagedMqttClient.cs @@ -11,7 +11,7 @@ using MQTTnet.Protocol; namespace MQTTnet.ManagedClient { - public class ManagedMqttClient : IManagedMqttClient, IDisposable + public class ManagedMqttClient : IManagedMqttClient { private readonly BlockingCollection _messageQueue = new BlockingCollection(); private readonly Dictionary _subscriptions = new Dictionary();