25개 이상의 토픽을 선택하실 수 없습니다. Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

MqttApplicationMessage.cs 889 B

1234567891011121314151617181920212223242526272829
  1. using System;
  2. using MQTTnet.Core.Protocol;
  3. namespace MQTTnet.Core
  4. {
  5. public sealed class MqttApplicationMessage
  6. {
  7. public MqttApplicationMessage()
  8. {
  9. }
  10. [Obsolete("Use object initializer or _MqttApplicationMessageBuilder_ instead.")]
  11. public MqttApplicationMessage(string topic, byte[] payload, MqttQualityOfServiceLevel qualityOfServiceLevel, bool retain)
  12. {
  13. Topic = topic ?? throw new ArgumentNullException(nameof(topic));
  14. Payload = payload ?? throw new ArgumentNullException(nameof(payload));
  15. QualityOfServiceLevel = qualityOfServiceLevel;
  16. Retain = retain;
  17. }
  18. public string Topic { get; set; }
  19. public byte[] Payload { get; set; }
  20. public MqttQualityOfServiceLevel QualityOfServiceLevel { get; set; }
  21. public bool Retain { get; set; }
  22. }
  23. }