Procházet zdrojové kódy

Refactor events.

release/3.x.x
Christian před 6 roky
rodič
revize
2499d29196
4 změnil soubory, kde provedl 18 přidání a 10 odebrání
  1. +2
    -1
      Frameworks/MQTTnet.NetStandard/Server/IMqttServer.cs
  2. +2
    -1
      Frameworks/MQTTnet.NetStandard/Server/MqttServer.cs
  3. +14
    -0
      Frameworks/MQTTnet.NetStandard/Server/MqttServerEventDispatcher.cs
  4. +0
    -8
      Frameworks/MQTTnet.NetStandard/Server/MqttServerStartedEventArgs.cs

+ 2
- 1
Frameworks/MQTTnet.NetStandard/Server/IMqttServer.cs Zobrazit soubor

@@ -6,7 +6,8 @@ namespace MQTTnet.Server
{
public interface IMqttServer : IApplicationMessageReceiver, IApplicationMessagePublisher
{
event EventHandler<MqttServerStartedEventArgs> Started;
event EventHandler Started;
event EventHandler Stopped;

event EventHandler<MqttClientConnectedEventArgs> ClientConnected;
event EventHandler<MqttClientDisconnectedEventArgs> ClientDisconnected;


+ 2
- 1
Frameworks/MQTTnet.NetStandard/Server/MqttServer.cs Zobrazit soubor

@@ -26,7 +26,8 @@ namespace MQTTnet.Server
_adapters = adapters.ToList();
}

public event EventHandler<MqttServerStartedEventArgs> Started;
public event EventHandler Started;
public event EventHandler Stopped;

public event EventHandler<MqttClientConnectedEventArgs> ClientConnected;
public event EventHandler<MqttClientDisconnectedEventArgs> ClientDisconnected;


+ 14
- 0
Frameworks/MQTTnet.NetStandard/Server/MqttServerEventDispatcher.cs Zobrazit soubor

@@ -0,0 +1,14 @@
using System;

namespace MQTTnet.Server
{
public class MqttServerEventDispatcher
{
public event EventHandler<MqttClientConnectedEventArgs> ClientConnected;
public event EventHandler<MqttClientDisconnectedEventArgs> ClientDisconnected;
public event EventHandler<MqttClientSubscribedTopicEventArgs> ClientSubscribedTopic;
public event EventHandler<MqttClientUnsubscribedTopicEventArgs> ClientUnsubscribedTopic;

public event EventHandler<MqttApplicationMessageReceivedEventArgs> ApplicationMessageReceived;
}
}

+ 0
- 8
Frameworks/MQTTnet.NetStandard/Server/MqttServerStartedEventArgs.cs Zobrazit soubor

@@ -1,8 +0,0 @@
using System;

namespace MQTTnet.Server
{
public class MqttServerStartedEventArgs : EventArgs
{
}
}

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