TLSharp/TeleSharp.TL/TL/Account/TLPasswordInputSettings.cs
AdmAlexus 6c7ec7f91a Fix V3029 warnings from PVS-Studio Static Analyzer
Warnings with low priority:

V3029 The conditional expressions of the 'if' statements situated
alongside each other are identical. Check lines: 69, 71.
TLPasswordInputSettings.cs 69

V3029 The conditional expressions of the 'if' statements situated
alongside each other are identical. Check lines: 71, 73.
TLPasswordInputSettings.cs 71

V3029 The conditional expressions of the 'if' statements situated
alongside each other are identical. Check lines: 91, 93.
TLPaymentForm.cs 91

V3029 The conditional expressions of the 'if' statements situated
alongside each other are identical. Check lines: 120, 122.
TLBotInlineResult.cs 120

V3029 The conditional expressions of the 'if' statements situated
alongside each other are identical. Check lines: 124, 126.
TLBotInlineResult.cs 124

V3029 The conditional expressions of the 'if' statements situated
alongside each other are identical. Check lines: 124, 126.
TLChannelFull.cs 124

V3029 The conditional expressions of the 'if' statements situated
alongside each other are identical. Check lines: 120, 122.
TLInputBotInlineResult.cs 120

V3029 The conditional expressions of the 'if' statements situated
alongside each other are identical. Check lines: 124, 126.
TLInputBotInlineResult.cs 124

V3029 The conditional expressions of the 'if' statements situated
alongside each other are identical. Check lines: 154, 156. TLWebPage.cs
154

V3029 The conditional expressions of the 'if' statements situated
alongside each other are identical. Check lines: 158, 160. TLWebPage.cs
158
2017-10-29 19:45:52 +05:00

81 lines
2.1 KiB
C#

using System;
using System.Collections.Generic;
using System.IO;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
using TeleSharp.TL;
namespace TeleSharp.TL.Account
{
[TLObject(-2037289493)]
public class TLPasswordInputSettings : TLObject
{
public override int Constructor
{
get
{
return -2037289493;
}
}
public int flags { get; set; }
public byte[] new_salt { get; set; }
public byte[] new_password_hash { get; set; }
public string hint { get; set; }
public string email { get; set; }
public void ComputeFlags()
{
flags = 0;
flags = new_salt != null ? (flags | 1) : (flags & ~1);
flags = new_password_hash != null ? (flags | 1) : (flags & ~1);
flags = hint != null ? (flags | 1) : (flags & ~1);
flags = email != null ? (flags | 2) : (flags & ~2);
}
public override void DeserializeBody(BinaryReader br)
{
flags = br.ReadInt32();
if ((flags & 1) != 0)
new_salt = BytesUtil.Deserialize(br);
else
new_salt = null;
if ((flags & 1) != 0)
new_password_hash = BytesUtil.Deserialize(br);
else
new_password_hash = null;
if ((flags & 1) != 0)
hint = StringUtil.Deserialize(br);
else
hint = null;
if ((flags & 2) != 0)
email = StringUtil.Deserialize(br);
else
email = null;
}
public override void SerializeBody(BinaryWriter bw)
{
bw.Write(Constructor);
ComputeFlags();
bw.Write(flags);
if ((flags & 1) != 0)
{
BytesUtil.Serialize(new_salt, bw);
BytesUtil.Serialize(new_password_hash, bw);
StringUtil.Serialize(hint, bw);
}
if ((flags & 2) != 0)
StringUtil.Serialize(email, bw);
}
}
}