/// <summary> /// Gets the size of. /// </summary> /// <returns>Size of this object.</returns> public int GetSizeOf() { int res = 8; IEnumerator shapes = this.GetEnumerator(); while (shapes.MoveNext()) { res += ((ShapeRecord)shapes.Current).GetBitSizeOf(res); } ShapeRecord lastShape = this.GetLastOne(); if (lastShape != null && !(lastShape is EndShapeRecord)) { EndShapeRecord end = new EndShapeRecord(); res += end.GetBitSizeOf(res); } return(Convert.ToInt32(Math.Ceiling((double)res / 8.0))); }
/// <summary> /// Gets the size of. /// </summary> /// <returns>Size of this object.</returns> public int GetSizeOf() { int res = 8; IEnumerator shapes = this.GetEnumerator(); while (shapes.MoveNext()) res += ((ShapeRecord)shapes.Current).GetBitSizeOf(res); ShapeRecord lastShape = this.GetLastOne(); if (lastShape != null && !(lastShape is EndShapeRecord)) { EndShapeRecord end = new EndShapeRecord(); res += end.GetBitSizeOf(res); } return Convert.ToInt32(Math.Ceiling((double)res / 8.0)); }