public static Wallets DeserializeLengthDelimited(Stream stream, Wallets instance) { long position = (long)ProtocolParser.ReadUInt32(stream); position += stream.Position; return(Wallets.Deserialize(stream, instance, position)); }
public static Wallets DeserializeLengthDelimited(Stream stream) { Wallets wallet = new Wallets(); Wallets.DeserializeLengthDelimited(stream, wallet); return(wallet); }
public static Wallets DeserializeLengthDelimited(Stream stream, Wallets instance) { long num = (long)((ulong)ProtocolParser.ReadUInt32(stream)); num += stream.get_Position(); return(Wallets.Deserialize(stream, instance, num)); }
public static void Serialize(Stream stream, Wallets instance) { if (instance.Wallets_.Count > 0) { foreach (Wallet wallets_ in instance.Wallets_) { stream.WriteByte(10); ProtocolParser.WriteUInt32(stream, wallets_.GetSerializedSize()); Wallet.Serialize(stream, wallets_); } } }
public static void Serialize(Stream stream, Wallets 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 Wallets Deserialize(Stream stream, Wallets 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 Wallets Deserialize(Stream stream, Wallets 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) { Wallets wallet = obj as Wallets; if (wallet == null) { return(false); } if (this.Wallets_.Count != wallet.Wallets_.Count) { return(false); } for (int i = 0; i < this.Wallets_.Count; i++) { if (!this.Wallets_[i].Equals(wallet.Wallets_[i])) { return(false); } } return(true); }
public override bool Equals(object obj) { Wallets wallets = obj as Wallets; if (wallets == null) { return(false); } if (this.Wallets_.get_Count() != wallets.Wallets_.get_Count()) { return(false); } for (int i = 0; i < this.Wallets_.get_Count(); i++) { if (!this.Wallets_.get_Item(i).Equals(wallets.Wallets_.get_Item(i))) { return(false); } } return(true); }
public static Wallets Deserialize(Stream stream, Wallets instance) { return(Wallets.Deserialize(stream, instance, (long)-1)); }
public void Deserialize(Stream stream) { Wallets.Deserialize(stream, this); }
public void Serialize(Stream stream) { Wallets.Serialize(stream, this); }