mirror of
https://github.com/dotnet/MQTTnet.git
synced 2026-10-15 17:00:03 +08:00
* Add support for RetainHandling. * Add support for No Local. * Add support for _SubscriptionIdentifier_. * Add more Unit Tests. * Update docs.
38 lines
1.2 KiB
C#
38 lines
1.2 KiB
C#
using System;
|
|
using MQTTnet.Client.Connecting;
|
|
|
|
namespace MQTTnet.Client.Disconnecting
|
|
{
|
|
public sealed class MqttClientDisconnectedEventArgs : EventArgs
|
|
{
|
|
public MqttClientDisconnectedEventArgs(bool clientWasConnected, Exception exception, MqttClientConnectResult connectResult, MqttClientDisconnectReason reason)
|
|
{
|
|
ClientWasConnected = clientWasConnected;
|
|
Exception = exception;
|
|
ConnectResult = connectResult;
|
|
Reason = reason;
|
|
|
|
ReasonCode = reason;
|
|
}
|
|
|
|
public bool ClientWasConnected { get; }
|
|
|
|
public Exception Exception { get; }
|
|
|
|
/// <summary>
|
|
/// Gets the authentication result.
|
|
/// Hint: MQTT 5 feature only.
|
|
/// </summary>
|
|
public MqttClientConnectResult ConnectResult { get; }
|
|
|
|
/// <summary>
|
|
/// Gets or sets the reason.
|
|
/// Hint: MQTT 5 feature only.
|
|
/// </summary>
|
|
public MqttClientDisconnectReason Reason { get; set; }
|
|
|
|
[Obsolete("Please use 'Reason' instead. This property will be removed in the future!")]
|
|
public MqttClientDisconnectReason ReasonCode { get; set; }
|
|
}
|
|
}
|