Exemple #1
0
 public static void Serialize(Stream stream, ListChannelCountResponse instance)
 {
     if (instance.Channel.get_Count() > 0)
     {
         using (List <ChannelCount> .Enumerator enumerator = instance.Channel.GetEnumerator())
         {
             while (enumerator.MoveNext())
             {
                 ChannelCount current = enumerator.get_Current();
                 stream.WriteByte(10);
                 ProtocolParser.WriteUInt32(stream, current.GetSerializedSize());
                 bnet.protocol.channel_invitation.ChannelCount.Serialize(stream, current);
             }
         }
     }
 }
Exemple #2
0
        public uint GetSerializedSize()
        {
            uint num = 0u;

            if (this.Channel.get_Count() > 0)
            {
                using (List <ChannelCount> .Enumerator enumerator = this.Channel.GetEnumerator())
                {
                    while (enumerator.MoveNext())
                    {
                        ChannelCount current = enumerator.get_Current();
                        num += 1u;
                        uint serializedSize = current.GetSerializedSize();
                        num += serializedSize + ProtocolParser.SizeOfUInt32(serializedSize);
                    }
                }
            }
            return(num);
        }