public static GetEBalanceResponse DeserializeLengthDelimited(Stream stream) { GetEBalanceResponse getEBalanceResponse = new GetEBalanceResponse(); GetEBalanceResponse.DeserializeLengthDelimited(stream, getEBalanceResponse); return(getEBalanceResponse); }
public static GetEBalanceResponse DeserializeLengthDelimited(Stream stream, GetEBalanceResponse instance) { long position = (long)ProtocolParser.ReadUInt32(stream); position += stream.Position; return(GetEBalanceResponse.Deserialize(stream, instance, position)); }
public static GetEBalanceResponse DeserializeLengthDelimited(Stream stream, GetEBalanceResponse instance) { long num = (long)((ulong)ProtocolParser.ReadUInt32(stream)); num += stream.get_Position(); return(GetEBalanceResponse.Deserialize(stream, instance, num)); }
public static GetEBalanceResponse Deserialize(Stream stream, GetEBalanceResponse instance, long limit) { while (limit < 0L || stream.Position < limit) { int num = stream.ReadByte(); if (num == -1) { if (limit >= 0L) { throw new EndOfStreamException(); } return(instance); } else if (num != 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.Balance = ProtocolParser.ReadString(stream); } } if (stream.Position == limit) { return(instance); } throw new ProtocolBufferException("Read past max limit"); }
public static void Serialize(Stream stream, GetEBalanceResponse instance) { if (instance.HasBalance) { stream.WriteByte(10); ProtocolParser.WriteBytes(stream, Encoding.UTF8.GetBytes(instance.Balance)); } }
public override bool Equals(object obj) { GetEBalanceResponse getEBalanceResponse = obj as GetEBalanceResponse; if (getEBalanceResponse == null) { return(false); } if (this.HasBalance == getEBalanceResponse.HasBalance && (!this.HasBalance || this.Balance.Equals(getEBalanceResponse.Balance))) { return(true); } return(false); }
public static GetEBalanceResponse Deserialize(Stream stream, GetEBalanceResponse instance) { return(GetEBalanceResponse.Deserialize(stream, instance, (long)-1)); }
public void Deserialize(Stream stream) { GetEBalanceResponse.Deserialize(stream, this); }
public override bool Equals(object obj) { GetEBalanceResponse getEBalanceResponse = obj as GetEBalanceResponse; return(getEBalanceResponse != null && this.HasBalance == getEBalanceResponse.HasBalance && (!this.HasBalance || this.Balance.Equals(getEBalanceResponse.Balance))); }