public ushort ReadUInt16() { byte[] data = Read(2); ushort result = BitConverter.ToUInt16(data, 0); return(BufferUtils.SwapUInt16(result)); }
public void Load(IProtocolBuffer buffer) { byte[] data = buffer.Read(2); Count = BitConverter.ToUInt16(data, 0); Count = BufferUtils.SwapUInt16(Count); data = buffer.Read(2); Index = BitConverter.ToUInt16(data, 0); Index = BufferUtils.SwapUInt16(Count); }
public void Save(IProtocolBuffer buffer) { Count = BufferUtils.SwapUInt16(Count); Index = BufferUtils.SwapUInt16(Index); }
public void Write(ushort value) { value = BufferUtils.SwapUInt16(value); byte[] data = BitConverter.GetBytes(value); Write(data); }