Browse Source

Add overload for setting message payload.

release/3.x.x
Christian Kratky 5 years ago
parent
commit
ffe9c57ae8
1 changed files with 6 additions and 0 deletions
  1. +6
    -0
      Source/MQTTnet/MqttApplicationMessageBuilder.cs

+ 6
- 0
Source/MQTTnet/MqttApplicationMessageBuilder.cs View File

@@ -29,6 +29,12 @@ namespace MQTTnet
return this; return this;
} }


public MqttApplicationMessageBuilder WithPayload(byte[] payload)
{
_payload = payload;
return this;
}

public MqttApplicationMessageBuilder WithPayload(IEnumerable<byte> payload) public MqttApplicationMessageBuilder WithPayload(IEnumerable<byte> payload)
{ {
if (payload == null) if (payload == null)


Loading…
Cancel
Save