mirror of
https://github.com/dotnet/MQTTnet.git
synced 2026-10-16 17:23:04 +08:00
19 lines
630 B
C#
19 lines
630 B
C#
using System.Collections.Generic;
|
|
using System.Linq;
|
|
|
|
namespace MQTTnet.Packets
|
|
{
|
|
public sealed class MqttSubscribePacket : MqttBasePacket, IMqttPacketWithIdentifier
|
|
{
|
|
public ushort? PacketIdentifier { get; set; }
|
|
|
|
public IList<TopicFilter> TopicFilters { get; set; } = new List<TopicFilter>();
|
|
|
|
public override string ToString()
|
|
{
|
|
var topicFiltersText = string.Join(",", TopicFilters.Select(f => f.Topic + "@" + f.QualityOfServiceLevel));
|
|
return "Subscribe: [PacketIdentifier=" + PacketIdentifier + "] [TopicFilters=" + topicFiltersText + "]";
|
|
}
|
|
}
|
|
}
|