Even more performance optimizations

This commit is contained in:
Christian Kratky
2017-09-10 00:07:41 +02:00
parent f2502ac431
commit 6b1a6c054e
6 changed files with 14 additions and 11 deletions
+8 -3
View File
@@ -1,4 +1,4 @@
using System.Text;
using System;
using MQTTnet.Core.Protocol;
namespace MQTTnet.Core.Packets
@@ -17,8 +17,13 @@ namespace MQTTnet.Core.Packets
public override string ToString()
{
return
$"{nameof(MqttPublishPacket)} [Topic={Topic}] [Payload={Encoding.UTF8.GetString(Payload, 0, Payload.Length)}] [QoSLevel={QualityOfServiceLevel}] [Dup={Dup}] [Retain={Retain}] [PacketIdentifier={PacketIdentifier}]";
return nameof(MqttPublishPacket) +
": [Topic=" + Topic + "]" +
" [Payload=" + Convert.ToBase64String(Payload) + "]" +
" [QoSLevel=" + QualityOfServiceLevel + "]" +
" [Dup=" + Dup + "]" +
" [Retain=" + Retain + "]" +
" [PacketIdentifier=" + PacketIdentifier + "]";
}
}
}