소스 검색

Refactor events.

release/3.x.x
Christian 6 년 전
부모
커밋
2499d29196
4개의 변경된 파일18개의 추가작업 그리고 10개의 파일을 삭제
  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 파일 보기

@@ -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 파일 보기

@@ -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 파일 보기

@@ -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 파일 보기

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

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

불러오는 중...
취소
저장