예제 #1
0
 /// <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));
 }
예제 #2
0
 /// <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);
         }
     }
 }