This commit is contained in:
Christian
2022-02-20 21:10:46 +01:00
committed by GitHub
parent 47e674e4d3
commit 2ce9b94ec9
608 changed files with 22364 additions and 19420 deletions
+30 -8
View File
@@ -1,20 +1,42 @@
using MQTTnet.Protocol;
// Licensed to the .NET Foundation under one or more agreements.
// The .NET Foundation licenses this file to you under the MIT license.
// See the LICENSE file in the project root for more information.
using System.Collections.Generic;
using MQTTnet.Protocol;
namespace MQTTnet.Packets
{
public sealed class MqttDisconnectPacket : MqttBasePacket
public sealed class MqttDisconnectPacket : MqttPacket
{
#region Added in MQTTv5
/// <summary>
/// Added in MQTTv5.
/// </summary>
public MqttDisconnectReasonCode ReasonCode { get; set; } = MqttDisconnectReasonCode.NormalDisconnection;
public MqttDisconnectReasonCode? ReasonCode { get; set; }
/// <summary>
/// Added in MQTTv5.
/// </summary>
public string ReasonString { get; set; }
public MqttDisconnectPacketProperties Properties { get; set; }
/// <summary>
/// Added in MQTTv5.
/// </summary>
public string ServerReference { get; set; }
#endregion
/// <summary>
/// Added in MQTTv5.
/// </summary>
public uint SessionExpiryInterval { get; set; }
/// <summary>
/// Added in MQTTv5.
/// </summary>
public List<MqttUserProperty> UserProperties { get; set; }
public override string ToString()
{
return string.Concat("Disconnect: [ReasonCode=", ReasonCode, "]");
return $"Disconnect: [ReasonCode={ReasonCode}]";
}
}
}
}