Procházet zdrojové kódy

Make clients interfaces disposable.

release/3.x.x
Christian před 6 roky
rodič
revize
c7c84ad39b
4 změnil soubory, kde provedl 4 přidání a 4 odebrání
  1. +1
    -1
      Frameworks/MQTTnet.NetStandard/Client/IMqttClient.cs
  2. +1
    -1
      Frameworks/MQTTnet.NetStandard/Client/MqttClient.cs
  3. +1
    -1
      Frameworks/MQTTnet.NetStandard/ManagedClient/IManagedMqttClient.cs
  4. +1
    -1
      Frameworks/MQTTnet.NetStandard/ManagedClient/ManagedMqttClient.cs

+ 1
- 1
Frameworks/MQTTnet.NetStandard/Client/IMqttClient.cs Zobrazit soubor

@@ -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; }



+ 1
- 1
Frameworks/MQTTnet.NetStandard/Client/MqttClient.cs Zobrazit soubor

@@ -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;


+ 1
- 1
Frameworks/MQTTnet.NetStandard/ManagedClient/IManagedMqttClient.cs Zobrazit soubor

@@ -5,7 +5,7 @@ using MQTTnet.Client;

namespace MQTTnet.ManagedClient
{
public interface IManagedMqttClient : IApplicationMessageReceiver, IApplicationMessagePublisher
public interface IManagedMqttClient : IApplicationMessageReceiver, IApplicationMessagePublisher, IDisposable
{
bool IsConnected { get; }



+ 1
- 1
Frameworks/MQTTnet.NetStandard/ManagedClient/ManagedMqttClient.cs Zobrazit soubor

@@ -11,7 +11,7 @@ using MQTTnet.Protocol;

namespace MQTTnet.ManagedClient
{
public class ManagedMqttClient : IManagedMqttClient, IDisposable
public class ManagedMqttClient : IManagedMqttClient
{
private readonly BlockingCollection<MqttApplicationMessage> _messageQueue = new BlockingCollection<MqttApplicationMessage>();
private readonly Dictionary<string, MqttQualityOfServiceLevel> _subscriptions = new Dictionary<string, MqttQualityOfServiceLevel>();


Načítá se…
Zrušit
Uložit