public static GetWalletListResponse DeserializeLengthDelimited(Stream stream, GetWalletListResponse instance) { long num = (long)((ulong)ProtocolParser.ReadUInt32(stream)); num += stream.get_Position(); return(GetWalletListResponse.Deserialize(stream, instance, num)); }
public static GetWalletListResponse DeserializeLengthDelimited(Stream stream, GetWalletListResponse instance) { long position = (long)ProtocolParser.ReadUInt32(stream); position += stream.Position; return(GetWalletListResponse.Deserialize(stream, instance, position)); }
public static GetWalletListResponse DeserializeLengthDelimited(Stream stream) { GetWalletListResponse getWalletListResponse = new GetWalletListResponse(); GetWalletListResponse.DeserializeLengthDelimited(stream, getWalletListResponse); return(getWalletListResponse); }
public static void Serialize(Stream stream, GetWalletListResponse instance) { if (instance.Wallets.Count > 0) { foreach (Wallet wallet in instance.Wallets) { stream.WriteByte(10); ProtocolParser.WriteUInt32(stream, wallet.GetSerializedSize()); Wallet.Serialize(stream, wallet); } } }
public static void Serialize(Stream stream, GetWalletListResponse instance) { if (instance.Wallets.get_Count() > 0) { using (List <Wallet> .Enumerator enumerator = instance.Wallets.GetEnumerator()) { while (enumerator.MoveNext()) { Wallet current = enumerator.get_Current(); stream.WriteByte(10); ProtocolParser.WriteUInt32(stream, current.GetSerializedSize()); Wallet.Serialize(stream, current); } } } }
public static GetWalletListResponse Deserialize(Stream stream, GetWalletListResponse instance, long limit) { if (instance.Wallets == null) { instance.Wallets = new List <Wallet>(); } while (true) { if (limit < (long)0 || stream.Position < limit) { int num = stream.ReadByte(); if (num == -1) { if (limit >= (long)0) { throw new EndOfStreamException(); } break; } else if (num == 10) { instance.Wallets.Add(Wallet.DeserializeLengthDelimited(stream)); } else { Key key = ProtocolParser.ReadKey((byte)num, stream); if (key.Field == 0) { throw new ProtocolBufferException("Invalid field id: 0, something went wrong in the stream"); } ProtocolParser.SkipKey(stream, key); } } else { if (stream.Position != limit) { throw new ProtocolBufferException("Read past max limit"); } break; } } return(instance); }
public static GetWalletListResponse Deserialize(Stream stream, GetWalletListResponse instance, long limit) { if (instance.Wallets == null) { instance.Wallets = new List <Wallet>(); } 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) { Key key = ProtocolParser.ReadKey((byte)num, stream); uint field = key.Field; if (field == 0u) { throw new ProtocolBufferException("Invalid field id: 0, something went wrong in the stream"); } ProtocolParser.SkipKey(stream, key); } else { instance.Wallets.Add(Wallet.DeserializeLengthDelimited(stream)); } } } if (stream.get_Position() == limit) { return(instance); } throw new ProtocolBufferException("Read past max limit"); }
public override bool Equals(object obj) { GetWalletListResponse getWalletListResponse = obj as GetWalletListResponse; if (getWalletListResponse == null) { return(false); } if (this.Wallets.get_Count() != getWalletListResponse.Wallets.get_Count()) { return(false); } for (int i = 0; i < this.Wallets.get_Count(); i++) { if (!this.Wallets.get_Item(i).Equals(getWalletListResponse.Wallets.get_Item(i))) { return(false); } } return(true); }
public override bool Equals(object obj) { GetWalletListResponse getWalletListResponse = obj as GetWalletListResponse; if (getWalletListResponse == null) { return(false); } if (this.Wallets.Count != getWalletListResponse.Wallets.Count) { return(false); } for (int i = 0; i < this.Wallets.Count; i++) { if (!this.Wallets[i].Equals(getWalletListResponse.Wallets[i])) { return(false); } } return(true); }
public static GetWalletListResponse Deserialize(Stream stream, GetWalletListResponse instance) { return(GetWalletListResponse.Deserialize(stream, instance, -1L)); }
public void Deserialize(Stream stream) { GetWalletListResponse.Deserialize(stream, this); }