public int Size() { int size = 0; for (var i1 = 0; i1 < this.IntArray.Length; i1++) { size += Gobuf.VarintSize(this.IntArray[i1]); } for (var i1 = 0; i1 < this.UintArray.Length; i1++) { size += Gobuf.UvarintSize(this.UintArray[i1]); } size += 1 * 1; size += Gobuf.UvarintSize((ulong)this.Uint8Array.Length) + this.Uint8Array.Length; size += 1 * 2; size += 1 * 2; size += 1 * 4; size += 1 * 4; size += 1 * 8; size += 1 * 8; size += 1 * 4; size += 1 * 8; for (var i1 = 0; i1 < this.StringArray.Length; i1++) { size += Gobuf.StringSize(this.StringArray[i1]); } size += 1 * 1; return(size); }
public int Size() { int size = 0; size += Gobuf.UvarintSize((ulong)this.IntArray.Count); for (var i1 = 0; i1 < this.IntArray.Count; i1++) { size += Gobuf.VarintSize(this.IntArray[i1]); } size += Gobuf.UvarintSize((ulong)this.UintArray.Count); for (var i1 = 0; i1 < this.UintArray.Count; i1++) { size += Gobuf.UvarintSize(this.UintArray[i1]); } size += Gobuf.UvarintSize((ulong)this.Int8Array.Count) + this.Int8Array.Count * 1; size += Gobuf.UvarintSize((ulong)this.Uint8Array.Length) + this.Uint8Array.Length; size += Gobuf.UvarintSize((ulong)this.Int16Array.Count) + this.Int16Array.Count * 2; size += Gobuf.UvarintSize((ulong)this.Uint16Array.Count) + this.Uint16Array.Count * 2; size += Gobuf.UvarintSize((ulong)this.Int32Array.Count) + this.Int32Array.Count * 4; size += Gobuf.UvarintSize((ulong)this.Uint32Array.Count) + this.Uint32Array.Count * 4; size += Gobuf.UvarintSize((ulong)this.Int64Array.Count) + this.Int64Array.Count * 8; size += Gobuf.UvarintSize((ulong)this.Uint64Array.Count) + this.Uint64Array.Count * 8; size += Gobuf.UvarintSize((ulong)this.Float32Array.Count) + this.Float32Array.Count * 4; size += Gobuf.UvarintSize((ulong)this.Float64Array.Count) + this.Float64Array.Count * 8; size += Gobuf.UvarintSize((ulong)this.StringArray.Count); for (var i1 = 0; i1 < this.StringArray.Count; i1++) { size += Gobuf.StringSize(this.StringArray[i1]); } size += Gobuf.UvarintSize((ulong)this.BoolArray.Count) + this.BoolArray.Count * 1; return(size); }
public int Size() { int size = 0; size += 1; size += Gobuf.VarintSize(this.Int); size += Gobuf.UvarintSize(this.Uint); size += 1; size += 1; size += 2; size += 2; size += 4; size += 4; size += 8; size += 8; size += 4; size += 8; size += Gobuf.StringSize(this.String); size += Gobuf.UvarintSize((ulong)this.Bytes.Length) + this.Bytes.Length; size += 1; return(size); }
public int Size() { int size = 0; size += Gobuf.UvarintSize((ulong)this.IntMap.Count); foreach (var item1 in this.IntMap) { size += Gobuf.VarintSize(item1.Key); size += Gobuf.VarintSize(item1.Value); } size += Gobuf.UvarintSize((ulong)this.UintMap.Count); foreach (var item1 in this.UintMap) { size += Gobuf.VarintSize(item1.Key); size += Gobuf.UvarintSize(item1.Value); } size += Gobuf.UvarintSize((ulong)this.Int8Map.Count); foreach (var item1 in this.Int8Map) { size += Gobuf.VarintSize(item1.Key); size += 1; } size += Gobuf.UvarintSize((ulong)this.Uint8Map.Count); foreach (var item1 in this.Uint8Map) { size += Gobuf.VarintSize(item1.Key); size += 1; } size += Gobuf.UvarintSize((ulong)this.Int16Map.Count); foreach (var item1 in this.Int16Map) { size += Gobuf.VarintSize(item1.Key); size += 2; } size += Gobuf.UvarintSize((ulong)this.Uint16Map.Count); foreach (var item1 in this.Uint16Map) { size += Gobuf.VarintSize(item1.Key); size += 2; } size += Gobuf.UvarintSize((ulong)this.Int32Map.Count); foreach (var item1 in this.Int32Map) { size += Gobuf.VarintSize(item1.Key); size += 4; } size += Gobuf.UvarintSize((ulong)this.Uint32Map.Count); foreach (var item1 in this.Uint32Map) { size += Gobuf.VarintSize(item1.Key); size += 4; } size += Gobuf.UvarintSize((ulong)this.Int64Map.Count); foreach (var item1 in this.Int64Map) { size += Gobuf.VarintSize(item1.Key); size += 8; } size += Gobuf.UvarintSize((ulong)this.Uint64Map.Count); foreach (var item1 in this.Uint64Map) { size += Gobuf.VarintSize(item1.Key); size += 8; } size += Gobuf.UvarintSize((ulong)this.Float32Map.Count); foreach (var item1 in this.Float32Map) { size += Gobuf.VarintSize(item1.Key); size += 4; } size += Gobuf.UvarintSize((ulong)this.Float64Map.Count); foreach (var item1 in this.Float64Map) { size += Gobuf.VarintSize(item1.Key); size += 8; } size += Gobuf.UvarintSize((ulong)this.StringMap.Count); foreach (var item1 in this.StringMap) { size += Gobuf.VarintSize(item1.Key); size += Gobuf.StringSize(item1.Value); } size += Gobuf.UvarintSize((ulong)this.BoolMap.Count); foreach (var item1 in this.BoolMap) { size += Gobuf.VarintSize(item1.Key); size += 1; } return(size); }
public int Size() { int size = 0; size += 1; if (this.IntPtr != null) { size += Gobuf.VarintSize(this.IntPtr.Value); } size += 1; if (this.UintPtr != null) { size += Gobuf.UvarintSize(this.UintPtr.Value); } size += 1; if (this.Int8Ptr != null) { size += 1; } size += 1; if (this.Uint8Ptr != null) { size += 1; } size += 1; if (this.Int16Ptr != null) { size += 2; } size += 1; if (this.Uint16Ptr != null) { size += 2; } size += 1; if (this.Int32Ptr != null) { size += 4; } size += 1; if (this.Uint32Ptr != null) { size += 4; } size += 1; if (this.Int64Ptr != null) { size += 8; } size += 1; if (this.Uint64Ptr != null) { size += 8; } size += 1; if (this.Float32Ptr != null) { size += 4; } size += 1; if (this.Float64Ptr != null) { size += 8; } size += 1; if (this.StringPtr != null) { size += Gobuf.StringSize(this.StringPtr); } size += 1; if (this.BoolPtr != null) { size += 1; } return(size); }