text: public override int Serialize(int offset, byte[] data, EscherSerializationListener listener){listener.BeforeRecordSerialize(offset, RecordId, this);if (remainingData == null) remainingData = new byte[0];LittleEndian.PutShort(data, offset, Options);LittleEndian.PutShort(data, offset + 2, RecordId);int remainingBytes = remainingData.Length + (shortRecord ? 8 : 18);LittleEndian.PutInt(data, offset + 4, remainingBytes);LittleEndian.PutShort(data, offset + 8, field_1_flag);LittleEndian.PutShort(data, offset + 10, field_2_col1);LittleEndian.PutShort(data, offset + 12, field_3_dx1);LittleEndian.PutShort(data, offset + 14, field_4_row1);if (!shortRecord){LittleEndian.PutShort(data, offset + 16, field_5_dy1);LittleEndian.PutShort(data, offset + 18, field_6_col2);LittleEndian.PutShort(data, offset + 20, field_7_dx2);LittleEndian.PutShort(data, offset + 22, field_8_row2);LittleEndian.PutShort(data, offset + 24, field_9_dy2);}Array.Copy(remainingData, 0, data, offset + (shortRecord ? 16 : 26), remainingData.Length);int pos = offset + 8 + (shortRecord ? 8 : 18) + remainingData.Length;listener.AfterRecordSerialize(pos, RecordId, pos - offset, this);return pos - offset;}