public static AccountReference DeserializeLengthDelimited(Stream stream)
        {
            AccountReference accountReference = new AccountReference();

            AccountReference.DeserializeLengthDelimited(stream, accountReference);
            return(accountReference);
        }
Esempio n. 2
0
 public static GetAccountRequest Deserialize(Stream stream, GetAccountRequest instance, long limit)
 {
     instance.FetchAll              = false;
     instance.FetchBlob             = false;
     instance.FetchId               = false;
     instance.FetchEmail            = false;
     instance.FetchBattleTag        = false;
     instance.FetchFullName         = false;
     instance.FetchLinks            = false;
     instance.FetchParentalControls = false;
     while (limit < 0L || stream.get_Position() < limit)
     {
         int num = stream.ReadByte();
         if (num == -1)
         {
             if (limit >= 0L)
             {
                 throw new EndOfStreamException();
             }
             return(instance);
         }
         else
         {
             int num2 = num;
             if (num2 != 10)
             {
                 if (num2 != 80)
                 {
                     if (num2 != 88)
                     {
                         if (num2 != 96)
                         {
                             if (num2 != 104)
                             {
                                 if (num2 != 112)
                                 {
                                     if (num2 != 120)
                                     {
                                         Key  key   = ProtocolParser.ReadKey((byte)num, stream);
                                         uint field = key.Field;
                                         if (field != 16u)
                                         {
                                             if (field != 17u)
                                             {
                                                 if (field == 0u)
                                                 {
                                                     throw new ProtocolBufferException("Invalid field id: 0, something went wrong in the stream");
                                                 }
                                                 ProtocolParser.SkipKey(stream, key);
                                             }
                                             else if (key.WireType == Wire.Varint)
                                             {
                                                 instance.FetchParentalControls = ProtocolParser.ReadBool(stream);
                                             }
                                         }
                                         else if (key.WireType == Wire.Varint)
                                         {
                                             instance.FetchLinks = ProtocolParser.ReadBool(stream);
                                         }
                                     }
                                     else
                                     {
                                         instance.FetchFullName = ProtocolParser.ReadBool(stream);
                                     }
                                 }
                                 else
                                 {
                                     instance.FetchBattleTag = ProtocolParser.ReadBool(stream);
                                 }
                             }
                             else
                             {
                                 instance.FetchEmail = ProtocolParser.ReadBool(stream);
                             }
                         }
                         else
                         {
                             instance.FetchId = ProtocolParser.ReadBool(stream);
                         }
                     }
                     else
                     {
                         instance.FetchBlob = ProtocolParser.ReadBool(stream);
                     }
                 }
                 else
                 {
                     instance.FetchAll = ProtocolParser.ReadBool(stream);
                 }
             }
             else if (instance.Ref == null)
             {
                 instance.Ref = AccountReference.DeserializeLengthDelimited(stream);
             }
             else
             {
                 AccountReference.DeserializeLengthDelimited(stream, instance.Ref);
             }
         }
     }
     if (stream.get_Position() == limit)
     {
         return(instance);
     }
     throw new ProtocolBufferException("Read past max limit");
 }