public static GetLicensesRequest DeserializeLengthDelimited(Stream stream, GetLicensesRequest instance) { long num = (long)((ulong)ProtocolParser.ReadUInt32(stream)); num += stream.Position; return(GetLicensesRequest.Deserialize(stream, instance, num)); }
public static GetLicensesRequest DeserializeLengthDelimited(Stream stream) { GetLicensesRequest getLicensesRequest = new GetLicensesRequest(); GetLicensesRequest.DeserializeLengthDelimited(stream, getLicensesRequest); return(getLicensesRequest); }
public override bool Equals(object obj) { GetLicensesRequest getLicensesRequest = obj as GetLicensesRequest; if (getLicensesRequest == null) { return(false); } if (this.HasTargetId != getLicensesRequest.HasTargetId || this.HasTargetId && !this.TargetId.Equals(getLicensesRequest.TargetId)) { return(false); } if (this.HasGetAccountLicenses != getLicensesRequest.HasGetAccountLicenses || this.HasGetAccountLicenses && !this.GetAccountLicenses.Equals(getLicensesRequest.GetAccountLicenses)) { return(false); } if (this.HasGetGameAccountLicenses != getLicensesRequest.HasGetGameAccountLicenses || this.HasGetGameAccountLicenses && !this.GetGameAccountLicenses.Equals(getLicensesRequest.GetGameAccountLicenses)) { return(false); } if (this.HasGetDynamicAccountLicenses != getLicensesRequest.HasGetDynamicAccountLicenses || this.HasGetDynamicAccountLicenses && !this.GetDynamicAccountLicenses.Equals(getLicensesRequest.GetDynamicAccountLicenses)) { return(false); } if (this.HasProgramId != getLicensesRequest.HasProgramId || this.HasProgramId && !this.ProgramId.Equals(getLicensesRequest.ProgramId)) { return(false); } if (this.HasExcludeUnknownProgram == getLicensesRequest.HasExcludeUnknownProgram && (!this.HasExcludeUnknownProgram || this.ExcludeUnknownProgram.Equals(getLicensesRequest.ExcludeUnknownProgram))) { return(true); } return(false); }
public static void Serialize(Stream stream, GetLicensesRequest instance) { BinaryWriter binaryWriter = new BinaryWriter(stream); if (instance.HasTargetId) { stream.WriteByte(10); ProtocolParser.WriteUInt32(stream, instance.TargetId.GetSerializedSize()); EntityId.Serialize(stream, instance.TargetId); } if (instance.HasGetAccountLicenses) { stream.WriteByte(16); ProtocolParser.WriteBool(stream, instance.GetAccountLicenses); } if (instance.HasGetGameAccountLicenses) { stream.WriteByte(24); ProtocolParser.WriteBool(stream, instance.GetGameAccountLicenses); } if (instance.HasGetDynamicAccountLicenses) { stream.WriteByte(32); ProtocolParser.WriteBool(stream, instance.GetDynamicAccountLicenses); } if (instance.HasProgramId) { stream.WriteByte(45); binaryWriter.Write(instance.ProgramId); } if (instance.HasExcludeUnknownProgram) { stream.WriteByte(48); ProtocolParser.WriteBool(stream, instance.ExcludeUnknownProgram); } }
public void Serialize(Stream stream) { GetLicensesRequest.Serialize(stream, this); }
public static GetLicensesRequest Deserialize(Stream stream, GetLicensesRequest instance, long limit) { BinaryReader binaryReader = new BinaryReader(stream); instance.ExcludeUnknownProgram = false; while (limit < 0L || stream.Position < limit) { int num = stream.ReadByte(); if (num == -1) { if (limit >= 0L) { throw new EndOfStreamException(); } return(instance); } else { switch (num) { case 45: instance.ProgramId = binaryReader.ReadUInt32(); break; default: if (num != 10) { if (num != 16) { if (num != 24) { if (num != 32) { 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.GetDynamicAccountLicenses = ProtocolParser.ReadBool(stream); } } else { instance.GetGameAccountLicenses = ProtocolParser.ReadBool(stream); } } else { instance.GetAccountLicenses = ProtocolParser.ReadBool(stream); } } else if (instance.TargetId == null) { instance.TargetId = EntityId.DeserializeLengthDelimited(stream); } else { EntityId.DeserializeLengthDelimited(stream, instance.TargetId); } break; case 48: instance.ExcludeUnknownProgram = ProtocolParser.ReadBool(stream); break; } } } if (stream.Position == limit) { return(instance); } throw new ProtocolBufferException("Read past max limit"); }
public static GetLicensesRequest Deserialize(Stream stream, GetLicensesRequest instance) { return(GetLicensesRequest.Deserialize(stream, instance, -1L)); }
public override bool Equals(object obj) { GetLicensesRequest getLicensesRequest = obj as GetLicensesRequest; return(getLicensesRequest != null && this.HasTargetId == getLicensesRequest.HasTargetId && (!this.HasTargetId || this.TargetId.Equals(getLicensesRequest.TargetId)) && this.HasGetAccountLicenses == getLicensesRequest.HasGetAccountLicenses && (!this.HasGetAccountLicenses || this.GetAccountLicenses.Equals(getLicensesRequest.GetAccountLicenses)) && this.HasGetGameAccountLicenses == getLicensesRequest.HasGetGameAccountLicenses && (!this.HasGetGameAccountLicenses || this.GetGameAccountLicenses.Equals(getLicensesRequest.GetGameAccountLicenses)) && this.HasGetDynamicAccountLicenses == getLicensesRequest.HasGetDynamicAccountLicenses && (!this.HasGetDynamicAccountLicenses || this.GetDynamicAccountLicenses.Equals(getLicensesRequest.GetDynamicAccountLicenses)) && this.HasProgramId == getLicensesRequest.HasProgramId && (!this.HasProgramId || this.ProgramId.Equals(getLicensesRequest.ProgramId)) && this.HasExcludeUnknownProgram == getLicensesRequest.HasExcludeUnknownProgram && (!this.HasExcludeUnknownProgram || this.ExcludeUnknownProgram.Equals(getLicensesRequest.ExcludeUnknownProgram))); }