public int Unmarshal(byte[] b, int n) { this.Byte = (byte)b[n++]; this.Int = Gobuf.ReadVarint(b, ref n); this.Uint = Gobuf.ReadUvarint(b, ref n); this.Int8 = (sbyte)b[n++]; this.Uint8 = (byte)b[n++]; this.Int16 = (short)Gobuf.ReadUint16(b, ref n); this.Uint16 = (ushort)Gobuf.ReadUint16(b, ref n); this.Int32 = (int)Gobuf.ReadUint32(b, ref n); this.Uint32 = (uint)Gobuf.ReadUint32(b, ref n); this.Int64 = (long)Gobuf.ReadUint64(b, ref n); this.Uint64 = (ulong)Gobuf.ReadUint64(b, ref n); this.Float32 = Gobuf.ReadFloat32(b, ref n); this.Float64 = Gobuf.ReadFloat64(b, ref n); this.String = Gobuf.ReadString(b, ref n); this.Bytes = Gobuf.ReadBytes(b, ref n); this.Bool = b[n++] == 1; return(n); }
public int Unmarshal(byte[] b, int n) { this.IntArray = new long[1]; for (var i1 = 0; i1 < 1; i1++) { this.IntArray[i1] = Gobuf.ReadVarint(b, ref n); } this.UintArray = new ulong[1]; for (var i1 = 0; i1 < 1; i1++) { this.UintArray[i1] = Gobuf.ReadUvarint(b, ref n); } this.Int8Array = new sbyte[1]; for (var i1 = 0; i1 < 1; i1++) { this.Int8Array[i1] = (sbyte)b[n++]; } this.Uint8Array = Gobuf.ReadBytes(b, ref n); this.Int16Array = new short[1]; for (var i1 = 0; i1 < 1; i1++) { this.Int16Array[i1] = (short)Gobuf.ReadUint16(b, ref n); } this.Uint16Array = new ushort[1]; for (var i1 = 0; i1 < 1; i1++) { this.Uint16Array[i1] = (ushort)Gobuf.ReadUint16(b, ref n); } this.Int32Array = new int[1]; for (var i1 = 0; i1 < 1; i1++) { this.Int32Array[i1] = (int)Gobuf.ReadUint32(b, ref n); } this.Uint32Array = new uint[1]; for (var i1 = 0; i1 < 1; i1++) { this.Uint32Array[i1] = (uint)Gobuf.ReadUint32(b, ref n); } this.Int64Array = new long[1]; for (var i1 = 0; i1 < 1; i1++) { this.Int64Array[i1] = (long)Gobuf.ReadUint64(b, ref n); } this.Uint64Array = new ulong[1]; for (var i1 = 0; i1 < 1; i1++) { this.Uint64Array[i1] = (ulong)Gobuf.ReadUint64(b, ref n); } this.Float32Array = new float[1]; for (var i1 = 0; i1 < 1; i1++) { this.Float32Array[i1] = Gobuf.ReadFloat32(b, ref n); } this.Float64Array = new double[1]; for (var i1 = 0; i1 < 1; i1++) { this.Float64Array[i1] = Gobuf.ReadFloat64(b, ref n); } this.StringArray = new string[1]; for (var i1 = 0; i1 < 1; i1++) { this.StringArray[i1] = Gobuf.ReadString(b, ref n); } this.BoolArray = new bool[1]; for (var i1 = 0; i1 < 1; i1++) { this.BoolArray[i1] = b[n++] == 1; } return(n); }
public int Unmarshal(byte[] b, int n) { { this.IntArray = new List <long>((int)Gobuf.ReadUvarint(b, ref n)); for (var i1 = 0; i1 < this.IntArray.Capacity; i1++) { long v1; v1 = Gobuf.ReadVarint(b, ref n); this.IntArray.Add(v1); } } { this.UintArray = new List <ulong>((int)Gobuf.ReadUvarint(b, ref n)); for (var i1 = 0; i1 < this.UintArray.Capacity; i1++) { ulong v1; v1 = Gobuf.ReadUvarint(b, ref n); this.UintArray.Add(v1); } } { this.Int8Array = new List <sbyte>((int)Gobuf.ReadUvarint(b, ref n)); for (var i1 = 0; i1 < this.Int8Array.Capacity; i1++) { sbyte v1; v1 = (sbyte)b[n++]; this.Int8Array.Add(v1); } } this.Uint8Array = Gobuf.ReadBytes(b, ref n); { this.Int16Array = new List <short>((int)Gobuf.ReadUvarint(b, ref n)); for (var i1 = 0; i1 < this.Int16Array.Capacity; i1++) { short v1; v1 = (short)Gobuf.ReadUint16(b, ref n); this.Int16Array.Add(v1); } } { this.Uint16Array = new List <ushort>((int)Gobuf.ReadUvarint(b, ref n)); for (var i1 = 0; i1 < this.Uint16Array.Capacity; i1++) { ushort v1; v1 = (ushort)Gobuf.ReadUint16(b, ref n); this.Uint16Array.Add(v1); } } { this.Int32Array = new List <int>((int)Gobuf.ReadUvarint(b, ref n)); for (var i1 = 0; i1 < this.Int32Array.Capacity; i1++) { int v1; v1 = (int)Gobuf.ReadUint32(b, ref n); this.Int32Array.Add(v1); } } { this.Uint32Array = new List <uint>((int)Gobuf.ReadUvarint(b, ref n)); for (var i1 = 0; i1 < this.Uint32Array.Capacity; i1++) { uint v1; v1 = (uint)Gobuf.ReadUint32(b, ref n); this.Uint32Array.Add(v1); } } { this.Int64Array = new List <long>((int)Gobuf.ReadUvarint(b, ref n)); for (var i1 = 0; i1 < this.Int64Array.Capacity; i1++) { long v1; v1 = (long)Gobuf.ReadUint64(b, ref n); this.Int64Array.Add(v1); } } { this.Uint64Array = new List <ulong>((int)Gobuf.ReadUvarint(b, ref n)); for (var i1 = 0; i1 < this.Uint64Array.Capacity; i1++) { ulong v1; v1 = (ulong)Gobuf.ReadUint64(b, ref n); this.Uint64Array.Add(v1); } } { this.Float32Array = new List <float>((int)Gobuf.ReadUvarint(b, ref n)); for (var i1 = 0; i1 < this.Float32Array.Capacity; i1++) { float v1; v1 = Gobuf.ReadFloat32(b, ref n); this.Float32Array.Add(v1); } } { this.Float64Array = new List <double>((int)Gobuf.ReadUvarint(b, ref n)); for (var i1 = 0; i1 < this.Float64Array.Capacity; i1++) { double v1; v1 = Gobuf.ReadFloat64(b, ref n); this.Float64Array.Add(v1); } } { this.StringArray = new List <string>((int)Gobuf.ReadUvarint(b, ref n)); for (var i1 = 0; i1 < this.StringArray.Capacity; i1++) { string v1; v1 = Gobuf.ReadString(b, ref n); this.StringArray.Add(v1); } } { this.BoolArray = new List <bool>((int)Gobuf.ReadUvarint(b, ref n)); for (var i1 = 0; i1 < this.BoolArray.Capacity; i1++) { bool v1; v1 = b[n++] == 1; this.BoolArray.Add(v1); } } return(n); }