public static SubscribeChannelResponse DeserializeLengthDelimited(Stream stream, SubscribeChannelResponse instance) { long num = (long)((ulong)ProtocolParser.ReadUInt32(stream)); num += stream.get_Position(); return(SubscribeChannelResponse.Deserialize(stream, instance, num)); }
public static SubscribeChannelResponse DeserializeLengthDelimited(Stream stream, SubscribeChannelResponse instance) { long position = (long)ProtocolParser.ReadUInt32(stream); position += stream.Position; return(SubscribeChannelResponse.Deserialize(stream, instance, position)); }
public static SubscribeChannelResponse DeserializeLengthDelimited(Stream stream) { SubscribeChannelResponse subscribeChannelResponse = new SubscribeChannelResponse(); SubscribeChannelResponse.DeserializeLengthDelimited(stream, subscribeChannelResponse); return(subscribeChannelResponse); }
public static SubscribeChannelResponse Deserialize(Stream stream, SubscribeChannelResponse 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 != 8) { 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.ObjectId = ProtocolParser.ReadUInt64(stream); } } if (stream.Position == limit) { return(instance); } throw new ProtocolBufferException("Read past max limit"); }
public static void Serialize(Stream stream, SubscribeChannelResponse instance) { if (instance.HasObjectId) { stream.WriteByte(8); ProtocolParser.WriteUInt64(stream, instance.ObjectId); } }
public override bool Equals(object obj) { SubscribeChannelResponse subscribeChannelResponse = obj as SubscribeChannelResponse; if (subscribeChannelResponse == null) { return(false); } if (this.HasObjectId == subscribeChannelResponse.HasObjectId && (!this.HasObjectId || this.ObjectId.Equals(subscribeChannelResponse.ObjectId))) { return(true); } return(false); }
public void Serialize(Stream stream) { SubscribeChannelResponse.Serialize(stream, this); }
public static SubscribeChannelResponse Deserialize(Stream stream, SubscribeChannelResponse instance) { return(SubscribeChannelResponse.Deserialize(stream, instance, -1L)); }
public override bool Equals(object obj) { SubscribeChannelResponse subscribeChannelResponse = obj as SubscribeChannelResponse; return(subscribeChannelResponse != null && this.HasObjectId == subscribeChannelResponse.HasObjectId && (!this.HasObjectId || this.ObjectId.Equals(subscribeChannelResponse.ObjectId))); }