This commit is contained in:
Ilya P 2016-10-11 16:28:57 +03:00
parent a14dfdc1fe
commit 2ffa954246
9 changed files with 225 additions and 37 deletions

View file

@ -7,7 +7,7 @@ using System.Threading.Tasks;
using TeleSharp.TL;
namespace TeleSharp.TL.Auth
{
[TLObject(-2035355412)]
[TLObject(-2035355412)]
public class TLRequestSendCode : TLMethod
{
public override int Constructor
@ -18,55 +18,55 @@ namespace TeleSharp.TL.Auth
}
}
public int flags { get; set; }
public bool allow_flashcall { get; set; }
public string phone_number { get; set; }
public bool? current_number { get; set; }
public int api_id { get; set; }
public string api_hash { get; set; }
public Auth.TLSentCode Response { get; set; }
public int flags {get;set;}
public bool allow_flashcall {get;set;}
public string phone_number {get;set;}
public bool? current_number {get;set;}
public int api_id {get;set;}
public string api_hash {get;set;}
public Auth.TLSentCode Response{ get; set;}
public void ComputeFlags()
{
flags = 0;
flags = allow_flashcall ? (flags | 1) : (flags & ~1);
flags = current_number != null ? (flags | 1) : (flags & ~1);
public void ComputeFlags()
{
flags = 0;
flags = allow_flashcall ? (flags | 1) : (flags & ~1);
flags = current_number != null ? (flags | 1) : (flags & ~1);
}
}
public override void DeserializeBody(BinaryReader br)
{
flags = br.ReadInt32();
allow_flashcall = (flags & 1) != 0;
phone_number = StringUtil.Deserialize(br);
if ((flags & 1) != 0)
current_number = BoolUtil.Deserialize(br);
else
current_number = null;
allow_flashcall = (flags & 1) != 0;
phone_number = StringUtil.Deserialize(br);
if ((flags & 1) != 0)
current_number = BoolUtil.Deserialize(br);
else
current_number = null;
api_id = br.ReadInt32();
api_hash = StringUtil.Deserialize(br);
api_id = br.ReadInt32();
api_hash = StringUtil.Deserialize(br);
}
public override void SerializeBody(BinaryWriter bw)
{
bw.Write(Constructor);
bw.Write(Constructor);
ComputeFlags();
bw.Write(flags);
bw.Write(flags);
StringUtil.Serialize(phone_number, bw);
if ((flags & 1) != 0)
BoolUtil.Serialize(current_number.Value, bw);
bw.Write(api_id);
StringUtil.Serialize(api_hash, bw);
StringUtil.Serialize(phone_number,bw);
if ((flags & 1) != 0)
BoolUtil.Serialize(current_number.Value,bw);
bw.Write(api_id);
StringUtil.Serialize(api_hash,bw);
}
public override void deserializeResponse(BinaryReader br)
{
Response = (Auth.TLSentCode)ObjectUtils.DeserializeObject(br);
public override void deserializeResponse(BinaryReader br)
{
Response = (Auth.TLSentCode)ObjectUtils.DeserializeObject(br);
}
}
}
}