Nevar pievienot vairāk kā 25 tēmas Tēmai ir jāsākas ar burtu vai ciparu, tā var saturēt domu zīmes ('-') un var būt līdz 35 simboliem gara.

MqttPublishPacket.cs 841 B

1234567891011121314151617181920212223242526272829
  1. using System;
  2. using MQTTnet.Core.Protocol;
  3. namespace MQTTnet.Core.Packets
  4. {
  5. public sealed class MqttPublishPacket : MqttBasePublishPacket
  6. {
  7. public bool Retain { get; set; }
  8. public MqttQualityOfServiceLevel QualityOfServiceLevel { get; set; }
  9. public bool Dup { get; set; }
  10. public string Topic { get; set; }
  11. public byte[] Payload { get; set; }
  12. public override string ToString()
  13. {
  14. return nameof(MqttPublishPacket) +
  15. ": [Topic=" + Topic + "]" +
  16. " [Payload=" + Convert.ToBase64String(Payload) + "]" +
  17. " [QoSLevel=" + QualityOfServiceLevel + "]" +
  18. " [Dup=" + Dup + "]" +
  19. " [Retain=" + Retain + "]" +
  20. " [PacketIdentifier=" + PacketIdentifier + "]";
  21. }
  22. }
  23. }