Fix wrong event args types.

This commit is contained in:
Christian
2022-06-14 21:10:53 +02:00
parent 772cd3cd12
commit 41e0a25fc8
3 changed files with 8 additions and 7 deletions
+4 -3
View File
@@ -1,4 +1,5 @@
* [Server] Connections with _try_private_ flag (MQTT 3.1.1 Bridge) are now accepted. * [Server] Connections with _try_private_ flag (MQTT 3.1.1 Bridge) are now accepted (#1413).
* [Client] Added the flag _try_private_ (MQTT 3.1.1 Bridge) to client options. * [Client] Added the flag _try_private_ (MQTT 3.1.1 Bridge) to client options (#1413).
* [Client] Fixed MQTTv5 protocol violation in PUBLISH packets (#1423). * [Client] Fixed MQTTv5 protocol violation in PUBLISH packets (#1423).
* [Client] Added missing "WithWill..." methods in _MqttClientOptionsBuilder_. * [Client] Added missing "WithWill..." methods in _MqttClientOptionsBuilder_.
* [ManagedClient] Fixed wrong event args type for connected and disconnected events (#1432).
@@ -15,13 +15,13 @@ namespace MQTTnet.Extensions.ManagedClient
event Func<ApplicationMessageSkippedEventArgs, Task> ApplicationMessageSkippedAsync; event Func<ApplicationMessageSkippedEventArgs, Task> ApplicationMessageSkippedAsync;
event Func<EventArgs, Task> ConnectedAsync; event Func<MqttClientConnectedEventArgs, Task> ConnectedAsync;
event Func<ConnectingFailedEventArgs, Task> ConnectingFailedAsync; event Func<ConnectingFailedEventArgs, Task> ConnectingFailedAsync;
event Func<EventArgs, Task> ConnectionStateChangedAsync; event Func<EventArgs, Task> ConnectionStateChangedAsync;
event Func<EventArgs, Task> DisconnectedAsync; event Func<MqttClientDisconnectedEventArgs, Task> DisconnectedAsync;
event Func<ManagedProcessFailedEventArgs, Task> SynchronizingSubscriptionsFailedAsync; event Func<ManagedProcessFailedEventArgs, Task> SynchronizingSubscriptionsFailedAsync;
@@ -93,7 +93,7 @@ namespace MQTTnet.Extensions.ManagedClient
remove => InternalClient.ApplicationMessageReceivedAsync -= value; remove => InternalClient.ApplicationMessageReceivedAsync -= value;
} }
public event Func<EventArgs, Task> ConnectedAsync public event Func<MqttClientConnectedEventArgs, Task> ConnectedAsync
{ {
add => InternalClient.ConnectedAsync += value; add => InternalClient.ConnectedAsync += value;
remove => InternalClient.ConnectedAsync -= value; remove => InternalClient.ConnectedAsync -= value;
@@ -111,7 +111,7 @@ namespace MQTTnet.Extensions.ManagedClient
remove => _connectionStateChangedEvent.RemoveHandler(value); remove => _connectionStateChangedEvent.RemoveHandler(value);
} }
public event Func<EventArgs, Task> DisconnectedAsync public event Func<MqttClientDisconnectedEventArgs, Task> DisconnectedAsync
{ {
add => InternalClient.DisconnectedAsync += value; add => InternalClient.DisconnectedAsync += value;
remove => InternalClient.DisconnectedAsync -= value; remove => InternalClient.DisconnectedAsync -= value;