Пример #1
0
 public static void Serialize(Stream stream, PoolStateResponse instance)
 {
     if (instance.Info.Count > 0)
     {
         foreach (ServerInfo serverInfo in instance.Info)
         {
             stream.WriteByte(10);
             ProtocolParser.WriteUInt32(stream, serverInfo.GetSerializedSize());
             ServerInfo.Serialize(stream, serverInfo);
         }
     }
 }
 public static void Serialize(Stream stream, PoolStateResponse instance)
 {
     if (instance.Info.get_Count() > 0)
     {
         using (List <ServerInfo> .Enumerator enumerator = instance.Info.GetEnumerator())
         {
             while (enumerator.MoveNext())
             {
                 ServerInfo current = enumerator.get_Current();
                 stream.WriteByte(10);
                 ProtocolParser.WriteUInt32(stream, current.GetSerializedSize());
                 ServerInfo.Serialize(stream, current);
             }
         }
     }
 }
Пример #3
0
 public void Serialize(Stream stream)
 {
     ServerInfo.Serialize(stream, this);
 }