public int Unmarshal(byte[] b, int n) { this.Scalar = new Scalar(); n = this.Scalar.Unmarshal(b, n); if (b[n++] != 0) { this.ScalarPtr = new Scalar(); n = this.ScalarPtr.Unmarshal(b, n); } else { this.ScalarPtr = null; } { this.ScalarArray = new List <Scalar>((int)Gobuf.ReadUvarint(b, ref n)); for (var i1 = 0; i1 < this.ScalarArray.Capacity; i1++) { Scalar v1; v1 = new Scalar(); n = v1.Unmarshal(b, n); this.ScalarArray.Add(v1); } } { var cap1 = (int)Gobuf.ReadUvarint(b, ref n); this.ScalarMap = new Dictionary <long, Scalar>(cap1); for (var i1 = 0; i1 < cap1; i1++) { long key1; Scalar val1; key1 = Gobuf.ReadVarint(b, ref n); if (b[n++] != 0) { val1 = new Scalar(); n = val1.Unmarshal(b, n); } else { val1 = null; } this.ScalarMap.Add(key1, val1); } } return(n); }
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) { { var cap1 = (int)Gobuf.ReadUvarint(b, ref n); this.IntMap = new Dictionary <long, long>(cap1); for (var i1 = 0; i1 < cap1; i1++) { long key1; long val1; key1 = Gobuf.ReadVarint(b, ref n); val1 = Gobuf.ReadVarint(b, ref n); this.IntMap.Add(key1, val1); } } { var cap1 = (int)Gobuf.ReadUvarint(b, ref n); this.UintMap = new Dictionary <long, ulong>(cap1); for (var i1 = 0; i1 < cap1; i1++) { long key1; ulong val1; key1 = Gobuf.ReadVarint(b, ref n); val1 = Gobuf.ReadUvarint(b, ref n); this.UintMap.Add(key1, val1); } } { var cap1 = (int)Gobuf.ReadUvarint(b, ref n); this.Int8Map = new Dictionary <long, sbyte>(cap1); for (var i1 = 0; i1 < cap1; i1++) { long key1; sbyte val1; key1 = Gobuf.ReadVarint(b, ref n); val1 = (sbyte)b[n++]; this.Int8Map.Add(key1, val1); } } { var cap1 = (int)Gobuf.ReadUvarint(b, ref n); this.Uint8Map = new Dictionary <long, byte>(cap1); for (var i1 = 0; i1 < cap1; i1++) { long key1; byte val1; key1 = Gobuf.ReadVarint(b, ref n); val1 = (byte)b[n++]; this.Uint8Map.Add(key1, val1); } } { var cap1 = (int)Gobuf.ReadUvarint(b, ref n); this.Int16Map = new Dictionary <long, short>(cap1); for (var i1 = 0; i1 < cap1; i1++) { long key1; short val1; key1 = Gobuf.ReadVarint(b, ref n); val1 = (short)Gobuf.ReadUint16(b, ref n); this.Int16Map.Add(key1, val1); } } { var cap1 = (int)Gobuf.ReadUvarint(b, ref n); this.Uint16Map = new Dictionary <long, ushort>(cap1); for (var i1 = 0; i1 < cap1; i1++) { long key1; ushort val1; key1 = Gobuf.ReadVarint(b, ref n); val1 = (ushort)Gobuf.ReadUint16(b, ref n); this.Uint16Map.Add(key1, val1); } } { var cap1 = (int)Gobuf.ReadUvarint(b, ref n); this.Int32Map = new Dictionary <long, int>(cap1); for (var i1 = 0; i1 < cap1; i1++) { long key1; int val1; key1 = Gobuf.ReadVarint(b, ref n); val1 = (int)Gobuf.ReadUint32(b, ref n); this.Int32Map.Add(key1, val1); } } { var cap1 = (int)Gobuf.ReadUvarint(b, ref n); this.Uint32Map = new Dictionary <long, uint>(cap1); for (var i1 = 0; i1 < cap1; i1++) { long key1; uint val1; key1 = Gobuf.ReadVarint(b, ref n); val1 = (uint)Gobuf.ReadUint32(b, ref n); this.Uint32Map.Add(key1, val1); } } { var cap1 = (int)Gobuf.ReadUvarint(b, ref n); this.Int64Map = new Dictionary <long, long>(cap1); for (var i1 = 0; i1 < cap1; i1++) { long key1; long val1; key1 = Gobuf.ReadVarint(b, ref n); val1 = (long)Gobuf.ReadUint64(b, ref n); this.Int64Map.Add(key1, val1); } } { var cap1 = (int)Gobuf.ReadUvarint(b, ref n); this.Uint64Map = new Dictionary <long, ulong>(cap1); for (var i1 = 0; i1 < cap1; i1++) { long key1; ulong val1; key1 = Gobuf.ReadVarint(b, ref n); val1 = (ulong)Gobuf.ReadUint64(b, ref n); this.Uint64Map.Add(key1, val1); } } { var cap1 = (int)Gobuf.ReadUvarint(b, ref n); this.Float32Map = new Dictionary <long, float>(cap1); for (var i1 = 0; i1 < cap1; i1++) { long key1; float val1; key1 = Gobuf.ReadVarint(b, ref n); val1 = Gobuf.ReadFloat32(b, ref n); this.Float32Map.Add(key1, val1); } } { var cap1 = (int)Gobuf.ReadUvarint(b, ref n); this.Float64Map = new Dictionary <long, double>(cap1); for (var i1 = 0; i1 < cap1; i1++) { long key1; double val1; key1 = Gobuf.ReadVarint(b, ref n); val1 = Gobuf.ReadFloat64(b, ref n); this.Float64Map.Add(key1, val1); } } { var cap1 = (int)Gobuf.ReadUvarint(b, ref n); this.StringMap = new Dictionary <long, string>(cap1); for (var i1 = 0; i1 < cap1; i1++) { long key1; string val1; key1 = Gobuf.ReadVarint(b, ref n); val1 = Gobuf.ReadString(b, ref n); this.StringMap.Add(key1, val1); } } { var cap1 = (int)Gobuf.ReadUvarint(b, ref n); this.BoolMap = new Dictionary <long, bool>(cap1); for (var i1 = 0; i1 < cap1; i1++) { long key1; bool val1; key1 = Gobuf.ReadVarint(b, ref n); val1 = b[n++] == 1; this.BoolMap.Add(key1, val1); } } 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); }
public int Unmarshal(byte[] b, int n) { if (b[n++] != 0) { this.IntPtr = Gobuf.ReadVarint(b, ref n); } else { this.IntPtr = null; } if (b[n++] != 0) { this.UintPtr = Gobuf.ReadUvarint(b, ref n); } else { this.UintPtr = null; } if (b[n++] != 0) { this.Int8Ptr = (sbyte)b[n++]; } else { this.Int8Ptr = null; } if (b[n++] != 0) { this.Uint8Ptr = (byte)b[n++]; } else { this.Uint8Ptr = null; } if (b[n++] != 0) { this.Int16Ptr = (short)Gobuf.ReadUint16(b, ref n); } else { this.Int16Ptr = null; } if (b[n++] != 0) { this.Uint16Ptr = (ushort)Gobuf.ReadUint16(b, ref n); } else { this.Uint16Ptr = null; } if (b[n++] != 0) { this.Int32Ptr = (int)Gobuf.ReadUint32(b, ref n); } else { this.Int32Ptr = null; } if (b[n++] != 0) { this.Uint32Ptr = (uint)Gobuf.ReadUint32(b, ref n); } else { this.Uint32Ptr = null; } if (b[n++] != 0) { this.Int64Ptr = (long)Gobuf.ReadUint64(b, ref n); } else { this.Int64Ptr = null; } if (b[n++] != 0) { this.Uint64Ptr = (ulong)Gobuf.ReadUint64(b, ref n); } else { this.Uint64Ptr = null; } if (b[n++] != 0) { this.Float32Ptr = Gobuf.ReadFloat32(b, ref n); } else { this.Float32Ptr = null; } if (b[n++] != 0) { this.Float64Ptr = Gobuf.ReadFloat64(b, ref n); } else { this.Float64Ptr = null; } if (b[n++] != 0) { this.StringPtr = Gobuf.ReadString(b, ref n); } else { this.StringPtr = null; } if (b[n++] != 0) { this.BoolPtr = b[n++] == 1; } else { this.BoolPtr = null; } return(n); }