Added NightAlert project for travel kit

This commit is contained in:
2021-06-10 14:39:06 -04:00
commit d38d9e3b7e
308 changed files with 35922 additions and 0 deletions

View File

@@ -0,0 +1,41 @@
namespace Quobject.EngineIoClientDotNet.Parser
{
internal class Buffer
{
private Buffer()
{
}
public static byte[] Concat(byte[][] list)
{
int length = 0;
foreach (var buf in list)
{
length += buf.Length;
}
return Concat(list, length);
}
public static byte[] Concat(byte[][] list, int length)
{
if (list.Length == 0)
{
return new byte[0];
}
if (list.Length == 1)
{
return list[0];
}
ByteBuffer buffer = ByteBuffer.Allocate(length);
foreach (var buf in list)
{
buffer.Put(buf);
}
return buffer.Array();
}
}
}