示例#1
0
 public override void Serialize(BinaryWriter w)
 {
     base.Serialize(w);
     if (RetVal != null)
     {
         w.Write(true);
         w.Write((int)RetVal.Count);
         foreach (var element in RetVal)
         {
             ChatUserInfoSerializer.Serialize(element, w);
         }
     }
     else
     {
         w.Write(false);
     }
 }
示例#2
0
 public override void Deserialize(BinaryReader r)
 {
     base.Deserialize(r);
     {
         if (!r.ReadBoolean())
         {
             RetVal = null;
         }
         else
         {
             int lenght = r.ReadInt32();
             var list   = new List <ChatUserInfo>(lenght);
             for (int i = 0; i < lenght; i++)
             {
                 var x = ChatUserInfoSerializer.Deserialize(r);
                 list.Add(x);
             }
             RetVal = list;
         }
     }
 }
示例#3
0
 public override void Deserialize(BinaryReader r)
 {
     base.Deserialize(r);
     user = ChatUserInfoSerializer.Deserialize(r);
 }
示例#4
0
 public override void Serialize(BinaryWriter w)
 {
     base.Serialize(w);
     ChatUserInfoSerializer.Serialize(user, w);
 }