Added client documentation.

This commit is contained in:
SeppPenner
2021-01-03 21:46:53 +01:00
parent 75845d6416
commit 2047f44554
33 changed files with 1176 additions and 20 deletions
@@ -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!")]