From ffe9c57ae814cbd003453c16f41e3e3c41ad1939 Mon Sep 17 00:00:00 2001 From: Christian Kratky Date: Mon, 27 May 2019 22:45:56 +0200 Subject: [PATCH] Add overload for setting message payload. --- Source/MQTTnet/MqttApplicationMessageBuilder.cs | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/Source/MQTTnet/MqttApplicationMessageBuilder.cs b/Source/MQTTnet/MqttApplicationMessageBuilder.cs index 7d11689..c265e4d 100644 --- a/Source/MQTTnet/MqttApplicationMessageBuilder.cs +++ b/Source/MQTTnet/MqttApplicationMessageBuilder.cs @@ -29,6 +29,12 @@ namespace MQTTnet return this; } + public MqttApplicationMessageBuilder WithPayload(byte[] payload) + { + _payload = payload; + return this; + } + public MqttApplicationMessageBuilder WithPayload(IEnumerable payload) { if (payload == null)