public static GenerateSSOTokenResponse DeserializeLengthDelimited(Stream stream) { GenerateSSOTokenResponse generateSSOTokenResponse = new GenerateSSOTokenResponse(); GenerateSSOTokenResponse.DeserializeLengthDelimited(stream, generateSSOTokenResponse); return(generateSSOTokenResponse); }
public static GenerateSSOTokenResponse DeserializeLengthDelimited(Stream stream, GenerateSSOTokenResponse instance) { long num = (long)((ulong)ProtocolParser.ReadUInt32(stream)); num += stream.get_Position(); return(GenerateSSOTokenResponse.Deserialize(stream, instance, num)); }
public static GenerateSSOTokenResponse DeserializeLengthDelimited(Stream stream, GenerateSSOTokenResponse instance) { long position = (long)ProtocolParser.ReadUInt32(stream); position += stream.Position; return(GenerateSSOTokenResponse.Deserialize(stream, instance, position)); }
public static void Serialize(Stream stream, GenerateSSOTokenResponse instance) { if (instance.HasSsoId) { stream.WriteByte(10); ProtocolParser.WriteBytes(stream, instance.SsoId); } if (instance.HasSsoSecret) { stream.WriteByte(18); ProtocolParser.WriteBytes(stream, instance.SsoSecret); } }
public static GenerateSSOTokenResponse Deserialize(Stream stream, GenerateSSOTokenResponse instance, long limit) { 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) { if (num2 != 18) { 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.SsoSecret = ProtocolParser.ReadBytes(stream); } } else { instance.SsoId = ProtocolParser.ReadBytes(stream); } } } if (stream.get_Position() == limit) { return(instance); } throw new ProtocolBufferException("Read past max limit"); }
public override bool Equals(object obj) { GenerateSSOTokenResponse generateSSOTokenResponse = obj as GenerateSSOTokenResponse; if (generateSSOTokenResponse == null) { return(false); } if (this.HasSsoId != generateSSOTokenResponse.HasSsoId || this.HasSsoId && !this.SsoId.Equals(generateSSOTokenResponse.SsoId)) { return(false); } if (this.HasSsoSecret == generateSSOTokenResponse.HasSsoSecret && (!this.HasSsoSecret || this.SsoSecret.Equals(generateSSOTokenResponse.SsoSecret))) { return(true); } return(false); }
public static GenerateSSOTokenResponse Deserialize(Stream stream, GenerateSSOTokenResponse instance, long limit) { 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.SsoId = ProtocolParser.ReadBytes(stream); } else if (num == 18) { instance.SsoSecret = ProtocolParser.ReadBytes(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 GenerateSSOTokenResponse Deserialize(Stream stream, GenerateSSOTokenResponse instance) { return(GenerateSSOTokenResponse.Deserialize(stream, instance, -1L)); }
public void Deserialize(Stream stream) { GenerateSSOTokenResponse.Deserialize(stream, this); }
public override bool Equals(object obj) { GenerateSSOTokenResponse generateSSOTokenResponse = obj as GenerateSSOTokenResponse; return(generateSSOTokenResponse != null && this.HasSsoId == generateSSOTokenResponse.HasSsoId && (!this.HasSsoId || this.SsoId.Equals(generateSSOTokenResponse.SsoId)) && this.HasSsoSecret == generateSSOTokenResponse.HasSsoSecret && (!this.HasSsoSecret || this.SsoSecret.Equals(generateSSOTokenResponse.SsoSecret))); }