/// <summary> /// Serialize to binary stream. /// </summary> public void Serialize(BinWriter bw) { bw.WriteArray(pinyin, (ps, bwr) => ps.Serialize(bwr)); bw.WriteString(ChSimpl); bw.WriteString(ChTrad); bw.WriteArray(senses); bw.WriteArray(hanziPinyinMap, (x, bwr) => bwr.WriteShort(x)); }
/// <summary> /// Serialize to binary stream. /// </summary> public void Serialize(BinWriter bw) { bw.WriteArray(pinyin, (ps, bwr) => ps.Serialize(bwr)); bw.WriteString(ChSimpl); bw.WriteString(ChTrad); bw.WriteUShort(Freq); bw.WriteInt(StableId); bw.WriteByte((byte)Status); bw.WriteArray(senses); bw.WriteArray(hanziPinyinMap, (x, bwr) => bwr.WriteShort(x)); if (zhoEmbeds == null) { bw.WriteShort(0); } else { bw.WriteShort((short)zhoEmbeds.Length); for (int i = 0; i != zhoEmbeds.Length; ++i) { zhoEmbeds[i].Serialize(bw); } } }