Updated Utilities

This commit is contained in:
Tal Aloni 2017-01-20 12:17:13 +02:00
parent 0641ccd6cf
commit b509b6d0be

View file

@ -24,6 +24,12 @@ namespace Utilities
Array.Copy(bytes, 0, buffer, offset, bytes.Length);
}
public static void WriteInt16(byte[] buffer, ref int offset, short value)
{
WriteInt16(buffer, offset, value);
offset += 2;
}
public static void WriteUInt32(byte[] buffer, int offset, uint value)
{
byte[] bytes = LittleEndianConverter.GetBytes(value);
@ -66,6 +72,12 @@ namespace Utilities
Array.Copy(bytes, 0, buffer, offset, bytes.Length);
}
public static void WriteInt64(byte[] buffer, ref int offset, long value)
{
WriteInt64(buffer, offset, value);
offset += 8;
}
public static void WriteGuidBytes(byte[] buffer, int offset, Guid value)
{
byte[] bytes = LittleEndianConverter.GetBytes(value);