mirror of
https://github.com/dotnet/MQTTnet.git
synced 2026-10-16 17:23:04 +08:00
Initial commit.
This commit is contained in:
@@ -0,0 +1,27 @@
|
||||
using System;
|
||||
using MQTTnet.Core.Protocol;
|
||||
|
||||
namespace MQTTnet.Core
|
||||
{
|
||||
public class MqttApplicationMessage
|
||||
{
|
||||
public MqttApplicationMessage(string topic, byte[] payload, MqttQualityOfServiceLevel qualityOfServiceLevel, bool retain)
|
||||
{
|
||||
if (topic == null) throw new ArgumentNullException(nameof(topic));
|
||||
if (payload == null) throw new ArgumentNullException(nameof(payload));
|
||||
|
||||
Topic = topic;
|
||||
Payload = payload;
|
||||
QualityOfServiceLevel = qualityOfServiceLevel;
|
||||
Retain = retain;
|
||||
}
|
||||
|
||||
public string Topic { get; }
|
||||
|
||||
public byte[] Payload { get; }
|
||||
|
||||
public MqttQualityOfServiceLevel QualityOfServiceLevel { get; }
|
||||
|
||||
public bool Retain { get; }
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user