Beispiel #1
0
 public static void Serialize(Stream stream, AccountBlobList instance)
 {
     if (instance.Blob.get_Count() > 0)
     {
         using (List <AccountBlob> .Enumerator enumerator = instance.Blob.GetEnumerator())
         {
             while (enumerator.MoveNext())
             {
                 AccountBlob current = enumerator.get_Current();
                 stream.WriteByte(10);
                 ProtocolParser.WriteUInt32(stream, current.GetSerializedSize());
                 AccountBlob.Serialize(stream, current);
             }
         }
     }
 }
Beispiel #2
0
        public uint GetSerializedSize()
        {
            uint num = 0u;

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