mirror of
https://github.com/dotnet/MQTTnet.git
synced 2026-11-05 14:02:55 +08:00
Added client documentation.
This commit is contained in:
@@ -4,6 +4,11 @@ namespace MQTTnet.Client.Disconnecting
|
||||
{
|
||||
public interface IMqttClientDisconnectedHandler
|
||||
{
|
||||
/// <summary>
|
||||
/// Handles the events when a client gets disconnected.
|
||||
/// </summary>
|
||||
/// <param name="eventArgs">The event args.</param>
|
||||
/// <returns>A <see cref="Task"/> representing any asynchronous operation.</returns>
|
||||
Task HandleDisconnectedAsync(MqttClientDisconnectedEventArgs eventArgs);
|
||||
}
|
||||
}
|
||||
|
||||
@@ -2,8 +2,16 @@
|
||||
{
|
||||
public class MqttClientDisconnectOptions
|
||||
{
|
||||
/// <summary>
|
||||
/// Gets or sets the reason code.
|
||||
/// Hint: MQTT 5 feature only.
|
||||
/// </summary>
|
||||
public MqttClientDisconnectReason ReasonCode { get; set; } = MqttClientDisconnectReason.NormalDisconnection;
|
||||
|
||||
/// <summary>
|
||||
/// Gets or sets the reason string.
|
||||
/// Hint: MQTT 5 feature only.
|
||||
/// </summary>
|
||||
public string ReasonString { get; set; }
|
||||
}
|
||||
}
|
||||
|
||||
@@ -15,12 +15,26 @@ namespace MQTTnet.Client.Disconnecting
|
||||
ReasonCode = reason;
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Gets a value indicating whether the client was connected or not.
|
||||
/// </summary>
|
||||
public bool ClientWasConnected { get; }
|
||||
|
||||
/// <summary>
|
||||
/// Gets the exception.
|
||||
/// </summary>
|
||||
public Exception Exception { get; }
|
||||
|
||||
/// <summary>
|
||||
/// Gets the authentication result.
|
||||
/// Hint: MQTT 5 feature only.
|
||||
/// </summary>
|
||||
public MqttClientAuthenticateResult AuthenticateResult { 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!")]
|
||||
|
||||
Reference in New Issue
Block a user