mirror of
https://github.com/dotnet/MQTTnet.git
synced 2026-10-18 10:26:11 +08:00
27 lines
775 B
C#
27 lines
775 B
C#
using System.Collections.Generic;
|
|
using System.Linq;
|
|
using MQTTnet.Protocol;
|
|
|
|
namespace MQTTnet.Packets
|
|
{
|
|
public class MqttUnsubAckPacket : MqttBasePacket, IMqttPacketWithIdentifier
|
|
{
|
|
public ushort? PacketIdentifier { get; set; }
|
|
|
|
#region Added in MQTTv5
|
|
|
|
public MqttUnsubAckPacketProperties Properties { get; set; }
|
|
|
|
public List<MqttUnsubscribeReasonCode> ReasonCodes { get; set; } = new List<MqttUnsubscribeReasonCode>();
|
|
|
|
#endregion
|
|
|
|
public override string ToString()
|
|
{
|
|
var reasonCodesText = string.Join(",", ReasonCodes.Select(f => f.ToString()));
|
|
|
|
return string.Concat("UnsubAck: [PacketIdentifier=", PacketIdentifier, "] [ReasonCodes=", reasonCodesText, "]");
|
|
}
|
|
}
|
|
}
|