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