public byte GetMinByteSize() => 84; // of byte sized of fields (exclude extended) public void Deserialize(ref ReadOnlySpan <byte> buffer, int payloadSize) { var index = 0; var endIndex = payloadSize; var arraySize = 0; arraySize = 2; for (var i = 0; i < arraySize; i++) { ArD[i] = BinSerialize.ReadDouble(ref buffer); index += 8; } arraySize = 2; for (var i = 0; i < arraySize; i++) { ArF[i] = BinSerialize.ReadFloat(ref buffer); index += 4; } arraySize = 2; for (var i = 0; i < arraySize; i++) { ArU32[i] = BinSerialize.ReadUInt(ref buffer); index += 4; } arraySize = 2; for (var i = 0; i < arraySize; i++) { ArI32[i] = BinSerialize.ReadInt(ref buffer); index += 4; } arraySize = 2; for (var i = 0; i < arraySize; i++) { ArU16[i] = BinSerialize.ReadUShort(ref buffer); index += 2; } arraySize = 2; for (var i = 0; i < arraySize; i++) { ArI16[i] = BinSerialize.ReadShort(ref buffer); index += 2; } arraySize = 2; for (var i = 0; i < arraySize; i++) { ArU8[i] = (byte)BinSerialize.ReadByte(ref buffer); index += 1; } arraySize = 2; for (var i = 0; i < arraySize; i++) { ArI8[i] = (sbyte)BinSerialize.ReadByte(ref buffer); index += 1; } arraySize = /*ArrayLength*/ 32 - Math.Max(0, ((/*PayloadByteSize*/ 84 - payloadSize - /*ExtendedFieldsLength*/ 0) / 1 /*FieldTypeByteSize*/)); ArC = new char[arraySize]; unsafe { fixed(byte *bytePointer = buffer) fixed(char *charPointer = ArC) { Encoding.ASCII.GetChars(bytePointer, arraySize, charPointer, ArC.Length); } } buffer = buffer.Slice(arraySize); index += arraySize; }
public byte GetMinByteSize() => 24; // of byte sized of fields (exclude extended) public void Deserialize(ref ReadOnlySpan <byte> buffer, int payloadSize) { var index = 0; var endIndex = payloadSize; var arraySize = 0; arraySize = /*ArrayLength*/ 2 - Math.Max(0, ((/*PayloadByteSize*/ 24 - payloadSize - /*ExtendedFieldsLength*/ 0) / 8 /*FieldTypeByteSize*/)); ArD = new double[arraySize]; for (var i = 0; i < arraySize; i++) { ArD[i] = BinSerialize.ReadDouble(ref buffer); index += 8; } V3 = BinSerialize.ReadUInt(ref buffer); index += 4; arraySize = 2; for (var i = 0; i < arraySize; i++) { ArU16[i] = BinSerialize.ReadUShort(ref buffer); index += 2; } }
protected override double DeserializeValue(ref ReadOnlySpan <byte> buffer) { return(BinSerialize.ReadDouble(ref buffer)); }
public override void Deserialize(ref ReadOnlySpan <byte> buffer) { base.Deserialize(ref buffer); RawValue = BinSerialize.ReadDouble(ref buffer); }
public byte GetMinByteSize() => 179; // of byte sized of fields (exclude extended) public void Deserialize(ref ReadOnlySpan <byte> buffer, int payloadSize) { var index = 0; var endIndex = payloadSize; var arraySize = 0; U64 = BinSerialize.ReadULong(ref buffer); index += 8; S64 = BinSerialize.ReadLong(ref buffer); index += 8; D = BinSerialize.ReadDouble(ref buffer); index += 8; arraySize = /*ArrayLength*/ 3 - Math.Max(0, ((/*PayloadByteSize*/ 179 - payloadSize - /*ExtendedFieldsLength*/ 0) / 8 /*FieldTypeByteSize*/)); U64Array = new ulong[arraySize]; for (var i = 0; i < arraySize; i++) { U64Array[i] = BinSerialize.ReadULong(ref buffer); index += 8; } arraySize = 3; for (var i = 0; i < arraySize; i++) { S64Array[i] = BinSerialize.ReadLong(ref buffer); index += 8; } arraySize = 3; for (var i = 0; i < arraySize; i++) { DArray[i] = BinSerialize.ReadDouble(ref buffer); index += 8; } U32 = BinSerialize.ReadUInt(ref buffer); index += 4; S32 = BinSerialize.ReadInt(ref buffer); index += 4; F = BinSerialize.ReadFloat(ref buffer); index += 4; arraySize = 3; for (var i = 0; i < arraySize; i++) { U32Array[i] = BinSerialize.ReadUInt(ref buffer); index += 4; } arraySize = 3; for (var i = 0; i < arraySize; i++) { S32Array[i] = BinSerialize.ReadInt(ref buffer); index += 4; } arraySize = 3; for (var i = 0; i < arraySize; i++) { FArray[i] = BinSerialize.ReadFloat(ref buffer); index += 4; } U16 = BinSerialize.ReadUShort(ref buffer); index += 2; S16 = BinSerialize.ReadShort(ref buffer); index += 2; arraySize = 3; for (var i = 0; i < arraySize; i++) { U16Array[i] = BinSerialize.ReadUShort(ref buffer); index += 2; } arraySize = 3; for (var i = 0; i < arraySize; i++) { S16Array[i] = BinSerialize.ReadShort(ref buffer); index += 2; } C = (char)buffer[0]; buffer = buffer.Slice(1); index += 1; arraySize = 10; unsafe { fixed(byte *bytePointer = buffer) fixed(char *charPointer = S) { Encoding.ASCII.GetChars(bytePointer, arraySize, charPointer, S.Length); } } buffer = buffer.Slice(arraySize); index += arraySize; U8 = (byte)BinSerialize.ReadByte(ref buffer); index += 1; S8 = (sbyte)BinSerialize.ReadByte(ref buffer); index += 1; arraySize = 3; for (var i = 0; i < arraySize; i++) { U8Array[i] = (byte)BinSerialize.ReadByte(ref buffer); index += 1; } arraySize = 3; for (var i = 0; i < arraySize; i++) { S8Array[i] = (sbyte)BinSerialize.ReadByte(ref buffer); index += 1; } }
public void Deserialize(ref ReadOnlySpan <byte> buffer) { Uint1 = BinSerialize.ReadPackedUnsignedInteger(ref buffer); Double1 = BinSerialize.ReadDouble(ref buffer); String = BinSerialize.ReadString(ref buffer); }