Refactor namings of serializers etc.

This commit is contained in:
Christian Kratky
2018-11-19 00:14:15 +01:00
parent 3db22eea51
commit 48d5afa799
86 changed files with 709 additions and 248 deletions
@@ -0,0 +1,23 @@
using System;
namespace MQTTnet.Internal
{
public static class ArraySegmentExtensions
{
public static byte[] ToArray(this ArraySegment<byte> source)
{
if (source.Array == null)
{
return null;
}
var buffer = new byte[source.Count];
if (buffer.Length > 0)
{
Array.Copy(source.Array, source.Offset, buffer, 0, buffer.Length);
}
return buffer;
}
}
}