mirror of
https://github.com/sochix/TLSharp.git
synced 2026-04-06 06:55:06 +00:00
Generator Must Respect MS .NET API guidelines
This commit is contained in:
parent
3ba3ea53fd
commit
d769dd3c2f
646 changed files with 7213 additions and 7166 deletions
|
|
@ -18,62 +18,62 @@ namespace TeleSharp.TL.Payments
|
|||
}
|
||||
}
|
||||
|
||||
public int flags { get; set; }
|
||||
public bool can_save_credentials { get; set; }
|
||||
public bool password_missing { get; set; }
|
||||
public int bot_id { get; set; }
|
||||
public TLInvoice invoice { get; set; }
|
||||
public int provider_id { get; set; }
|
||||
public string url { get; set; }
|
||||
public string native_provider { get; set; }
|
||||
public TLDataJSON native_params { get; set; }
|
||||
public TLPaymentRequestedInfo saved_info { get; set; }
|
||||
public TLPaymentSavedCredentialsCard saved_credentials { get; set; }
|
||||
public TLVector<TLAbsUser> users { get; set; }
|
||||
public int Flags { get; set; }
|
||||
public bool CanSaveCredentials { get; set; }
|
||||
public bool PasswordMissing { get; set; }
|
||||
public int BotId { get; set; }
|
||||
public TLInvoice Invoice { get; set; }
|
||||
public int ProviderId { get; set; }
|
||||
public string Url { get; set; }
|
||||
public string NativeProvider { get; set; }
|
||||
public TLDataJSON NativeParams { get; set; }
|
||||
public TLPaymentRequestedInfo SavedInfo { get; set; }
|
||||
public TLPaymentSavedCredentialsCard SavedCredentials { get; set; }
|
||||
public TLVector<TLAbsUser> Users { get; set; }
|
||||
|
||||
|
||||
public void ComputeFlags()
|
||||
{
|
||||
flags = 0;
|
||||
flags = can_save_credentials ? (flags | 4) : (flags & ~4);
|
||||
flags = password_missing ? (flags | 8) : (flags & ~8);
|
||||
flags = native_provider != null ? (flags | 16) : (flags & ~16);
|
||||
flags = native_params != null ? (flags | 16) : (flags & ~16);
|
||||
flags = saved_info != null ? (flags | 1) : (flags & ~1);
|
||||
flags = saved_credentials != null ? (flags | 2) : (flags & ~2);
|
||||
Flags = 0;
|
||||
Flags = CanSaveCredentials ? (Flags | 4) : (Flags & ~4);
|
||||
Flags = PasswordMissing ? (Flags | 8) : (Flags & ~8);
|
||||
Flags = NativeProvider != null ? (Flags | 16) : (Flags & ~16);
|
||||
Flags = NativeParams != null ? (Flags | 16) : (Flags & ~16);
|
||||
Flags = SavedInfo != null ? (Flags | 1) : (Flags & ~1);
|
||||
Flags = SavedCredentials != null ? (Flags | 2) : (Flags & ~2);
|
||||
|
||||
}
|
||||
|
||||
public override void DeserializeBody(BinaryReader br)
|
||||
{
|
||||
flags = br.ReadInt32();
|
||||
can_save_credentials = (flags & 4) != 0;
|
||||
password_missing = (flags & 8) != 0;
|
||||
bot_id = br.ReadInt32();
|
||||
invoice = (TLInvoice)ObjectUtils.DeserializeObject(br);
|
||||
provider_id = br.ReadInt32();
|
||||
url = StringUtil.Deserialize(br);
|
||||
if ((flags & 16) != 0)
|
||||
native_provider = StringUtil.Deserialize(br);
|
||||
Flags = br.ReadInt32();
|
||||
CanSaveCredentials = (Flags & 4) != 0;
|
||||
PasswordMissing = (Flags & 8) != 0;
|
||||
BotId = br.ReadInt32();
|
||||
Invoice = (TLInvoice)ObjectUtils.DeserializeObject(br);
|
||||
ProviderId = br.ReadInt32();
|
||||
Url = StringUtil.Deserialize(br);
|
||||
if ((Flags & 16) != 0)
|
||||
NativeProvider = StringUtil.Deserialize(br);
|
||||
else
|
||||
native_provider = null;
|
||||
NativeProvider = null;
|
||||
|
||||
if ((flags & 16) != 0)
|
||||
native_params = (TLDataJSON)ObjectUtils.DeserializeObject(br);
|
||||
if ((Flags & 16) != 0)
|
||||
NativeParams = (TLDataJSON)ObjectUtils.DeserializeObject(br);
|
||||
else
|
||||
native_params = null;
|
||||
NativeParams = null;
|
||||
|
||||
if ((flags & 1) != 0)
|
||||
saved_info = (TLPaymentRequestedInfo)ObjectUtils.DeserializeObject(br);
|
||||
if ((Flags & 1) != 0)
|
||||
SavedInfo = (TLPaymentRequestedInfo)ObjectUtils.DeserializeObject(br);
|
||||
else
|
||||
saved_info = null;
|
||||
SavedInfo = null;
|
||||
|
||||
if ((flags & 2) != 0)
|
||||
saved_credentials = (TLPaymentSavedCredentialsCard)ObjectUtils.DeserializeObject(br);
|
||||
if ((Flags & 2) != 0)
|
||||
SavedCredentials = (TLPaymentSavedCredentialsCard)ObjectUtils.DeserializeObject(br);
|
||||
else
|
||||
saved_credentials = null;
|
||||
SavedCredentials = null;
|
||||
|
||||
users = (TLVector<TLAbsUser>)ObjectUtils.DeserializeVector<TLAbsUser>(br);
|
||||
Users = (TLVector<TLAbsUser>)ObjectUtils.DeserializeVector<TLAbsUser>(br);
|
||||
|
||||
}
|
||||
|
||||
|
|
@ -81,22 +81,22 @@ namespace TeleSharp.TL.Payments
|
|||
{
|
||||
bw.Write(Constructor);
|
||||
ComputeFlags();
|
||||
bw.Write(flags);
|
||||
bw.Write(Flags);
|
||||
|
||||
|
||||
bw.Write(bot_id);
|
||||
ObjectUtils.SerializeObject(invoice, bw);
|
||||
bw.Write(provider_id);
|
||||
StringUtil.Serialize(url, bw);
|
||||
if ((flags & 16) != 0)
|
||||
StringUtil.Serialize(native_provider, bw);
|
||||
if ((flags & 16) != 0)
|
||||
ObjectUtils.SerializeObject(native_params, bw);
|
||||
if ((flags & 1) != 0)
|
||||
ObjectUtils.SerializeObject(saved_info, bw);
|
||||
if ((flags & 2) != 0)
|
||||
ObjectUtils.SerializeObject(saved_credentials, bw);
|
||||
ObjectUtils.SerializeObject(users, bw);
|
||||
bw.Write(BotId);
|
||||
ObjectUtils.SerializeObject(Invoice, bw);
|
||||
bw.Write(ProviderId);
|
||||
StringUtil.Serialize(Url, bw);
|
||||
if ((Flags & 16) != 0)
|
||||
StringUtil.Serialize(NativeProvider, bw);
|
||||
if ((Flags & 16) != 0)
|
||||
ObjectUtils.SerializeObject(NativeParams, bw);
|
||||
if ((Flags & 1) != 0)
|
||||
ObjectUtils.SerializeObject(SavedInfo, bw);
|
||||
if ((Flags & 2) != 0)
|
||||
ObjectUtils.SerializeObject(SavedCredentials, bw);
|
||||
ObjectUtils.SerializeObject(Users, bw);
|
||||
|
||||
}
|
||||
}
|
||||
|
|
|
|||
|
|
@ -18,48 +18,48 @@ namespace TeleSharp.TL.Payments
|
|||
}
|
||||
}
|
||||
|
||||
public int flags { get; set; }
|
||||
public int date { get; set; }
|
||||
public int bot_id { get; set; }
|
||||
public TLInvoice invoice { get; set; }
|
||||
public int provider_id { get; set; }
|
||||
public TLPaymentRequestedInfo info { get; set; }
|
||||
public TLShippingOption shipping { get; set; }
|
||||
public string currency { get; set; }
|
||||
public long total_amount { get; set; }
|
||||
public string credentials_title { get; set; }
|
||||
public TLVector<TLAbsUser> users { get; set; }
|
||||
public int Flags { get; set; }
|
||||
public int Date { get; set; }
|
||||
public int BotId { get; set; }
|
||||
public TLInvoice Invoice { get; set; }
|
||||
public int ProviderId { get; set; }
|
||||
public TLPaymentRequestedInfo Info { get; set; }
|
||||
public TLShippingOption Shipping { get; set; }
|
||||
public string Currency { get; set; }
|
||||
public long TotalAmount { get; set; }
|
||||
public string CredentialsTitle { get; set; }
|
||||
public TLVector<TLAbsUser> Users { get; set; }
|
||||
|
||||
|
||||
public void ComputeFlags()
|
||||
{
|
||||
flags = 0;
|
||||
flags = info != null ? (flags | 1) : (flags & ~1);
|
||||
flags = shipping != null ? (flags | 2) : (flags & ~2);
|
||||
Flags = 0;
|
||||
Flags = Info != null ? (Flags | 1) : (Flags & ~1);
|
||||
Flags = Shipping != null ? (Flags | 2) : (Flags & ~2);
|
||||
|
||||
}
|
||||
|
||||
public override void DeserializeBody(BinaryReader br)
|
||||
{
|
||||
flags = br.ReadInt32();
|
||||
date = br.ReadInt32();
|
||||
bot_id = br.ReadInt32();
|
||||
invoice = (TLInvoice)ObjectUtils.DeserializeObject(br);
|
||||
provider_id = br.ReadInt32();
|
||||
if ((flags & 1) != 0)
|
||||
info = (TLPaymentRequestedInfo)ObjectUtils.DeserializeObject(br);
|
||||
Flags = br.ReadInt32();
|
||||
Date = br.ReadInt32();
|
||||
BotId = br.ReadInt32();
|
||||
Invoice = (TLInvoice)ObjectUtils.DeserializeObject(br);
|
||||
ProviderId = br.ReadInt32();
|
||||
if ((Flags & 1) != 0)
|
||||
Info = (TLPaymentRequestedInfo)ObjectUtils.DeserializeObject(br);
|
||||
else
|
||||
info = null;
|
||||
Info = null;
|
||||
|
||||
if ((flags & 2) != 0)
|
||||
shipping = (TLShippingOption)ObjectUtils.DeserializeObject(br);
|
||||
if ((Flags & 2) != 0)
|
||||
Shipping = (TLShippingOption)ObjectUtils.DeserializeObject(br);
|
||||
else
|
||||
shipping = null;
|
||||
Shipping = null;
|
||||
|
||||
currency = StringUtil.Deserialize(br);
|
||||
total_amount = br.ReadInt64();
|
||||
credentials_title = StringUtil.Deserialize(br);
|
||||
users = (TLVector<TLAbsUser>)ObjectUtils.DeserializeVector<TLAbsUser>(br);
|
||||
Currency = StringUtil.Deserialize(br);
|
||||
TotalAmount = br.ReadInt64();
|
||||
CredentialsTitle = StringUtil.Deserialize(br);
|
||||
Users = (TLVector<TLAbsUser>)ObjectUtils.DeserializeVector<TLAbsUser>(br);
|
||||
|
||||
}
|
||||
|
||||
|
|
@ -67,19 +67,19 @@ namespace TeleSharp.TL.Payments
|
|||
{
|
||||
bw.Write(Constructor);
|
||||
ComputeFlags();
|
||||
bw.Write(flags);
|
||||
bw.Write(date);
|
||||
bw.Write(bot_id);
|
||||
ObjectUtils.SerializeObject(invoice, bw);
|
||||
bw.Write(provider_id);
|
||||
if ((flags & 1) != 0)
|
||||
ObjectUtils.SerializeObject(info, bw);
|
||||
if ((flags & 2) != 0)
|
||||
ObjectUtils.SerializeObject(shipping, bw);
|
||||
StringUtil.Serialize(currency, bw);
|
||||
bw.Write(total_amount);
|
||||
StringUtil.Serialize(credentials_title, bw);
|
||||
ObjectUtils.SerializeObject(users, bw);
|
||||
bw.Write(Flags);
|
||||
bw.Write(Date);
|
||||
bw.Write(BotId);
|
||||
ObjectUtils.SerializeObject(Invoice, bw);
|
||||
bw.Write(ProviderId);
|
||||
if ((Flags & 1) != 0)
|
||||
ObjectUtils.SerializeObject(Info, bw);
|
||||
if ((Flags & 2) != 0)
|
||||
ObjectUtils.SerializeObject(Shipping, bw);
|
||||
StringUtil.Serialize(Currency, bw);
|
||||
bw.Write(TotalAmount);
|
||||
StringUtil.Serialize(CredentialsTitle, bw);
|
||||
ObjectUtils.SerializeObject(Users, bw);
|
||||
|
||||
}
|
||||
}
|
||||
|
|
|
|||
|
|
@ -18,7 +18,7 @@ namespace TeleSharp.TL.Payments
|
|||
}
|
||||
}
|
||||
|
||||
public TLAbsUpdates updates { get; set; }
|
||||
public TLAbsUpdates Updates { get; set; }
|
||||
|
||||
|
||||
public void ComputeFlags()
|
||||
|
|
@ -28,14 +28,14 @@ namespace TeleSharp.TL.Payments
|
|||
|
||||
public override void DeserializeBody(BinaryReader br)
|
||||
{
|
||||
updates = (TLAbsUpdates)ObjectUtils.DeserializeObject(br);
|
||||
Updates = (TLAbsUpdates)ObjectUtils.DeserializeObject(br);
|
||||
|
||||
}
|
||||
|
||||
public override void SerializeBody(BinaryWriter bw)
|
||||
{
|
||||
bw.Write(Constructor);
|
||||
ObjectUtils.SerializeObject(updates, bw);
|
||||
ObjectUtils.SerializeObject(Updates, bw);
|
||||
|
||||
}
|
||||
}
|
||||
|
|
|
|||
|
|
@ -18,7 +18,7 @@ namespace TeleSharp.TL.Payments
|
|||
}
|
||||
}
|
||||
|
||||
public string url { get; set; }
|
||||
public string Url { get; set; }
|
||||
|
||||
|
||||
public void ComputeFlags()
|
||||
|
|
@ -28,14 +28,14 @@ namespace TeleSharp.TL.Payments
|
|||
|
||||
public override void DeserializeBody(BinaryReader br)
|
||||
{
|
||||
url = StringUtil.Deserialize(br);
|
||||
Url = StringUtil.Deserialize(br);
|
||||
|
||||
}
|
||||
|
||||
public override void SerializeBody(BinaryWriter bw)
|
||||
{
|
||||
bw.Write(Constructor);
|
||||
StringUtil.Serialize(url, bw);
|
||||
StringUtil.Serialize(Url, bw);
|
||||
|
||||
}
|
||||
}
|
||||
|
|
|
|||
|
|
@ -18,25 +18,25 @@ namespace TeleSharp.TL.Payments
|
|||
}
|
||||
}
|
||||
|
||||
public int flags { get; set; }
|
||||
public bool credentials { get; set; }
|
||||
public bool info { get; set; }
|
||||
public int Flags { get; set; }
|
||||
public bool Credentials { get; set; }
|
||||
public bool Info { get; set; }
|
||||
public bool Response { get; set; }
|
||||
|
||||
|
||||
public void ComputeFlags()
|
||||
{
|
||||
flags = 0;
|
||||
flags = credentials ? (flags | 1) : (flags & ~1);
|
||||
flags = info ? (flags | 2) : (flags & ~2);
|
||||
Flags = 0;
|
||||
Flags = Credentials ? (Flags | 1) : (Flags & ~1);
|
||||
Flags = Info ? (Flags | 2) : (Flags & ~2);
|
||||
|
||||
}
|
||||
|
||||
public override void DeserializeBody(BinaryReader br)
|
||||
{
|
||||
flags = br.ReadInt32();
|
||||
credentials = (flags & 1) != 0;
|
||||
info = (flags & 2) != 0;
|
||||
Flags = br.ReadInt32();
|
||||
Credentials = (Flags & 1) != 0;
|
||||
Info = (Flags & 2) != 0;
|
||||
|
||||
}
|
||||
|
||||
|
|
@ -44,12 +44,12 @@ namespace TeleSharp.TL.Payments
|
|||
{
|
||||
bw.Write(Constructor);
|
||||
ComputeFlags();
|
||||
bw.Write(flags);
|
||||
bw.Write(Flags);
|
||||
|
||||
|
||||
|
||||
}
|
||||
public override void deserializeResponse(BinaryReader br)
|
||||
public override void DeserializeResponse(BinaryReader br)
|
||||
{
|
||||
Response = BoolUtil.Deserialize(br);
|
||||
|
||||
|
|
|
|||
|
|
@ -18,7 +18,7 @@ namespace TeleSharp.TL.Payments
|
|||
}
|
||||
}
|
||||
|
||||
public int msg_id { get; set; }
|
||||
public int MsgId { get; set; }
|
||||
public Payments.TLPaymentForm Response { get; set; }
|
||||
|
||||
|
||||
|
|
@ -29,17 +29,17 @@ namespace TeleSharp.TL.Payments
|
|||
|
||||
public override void DeserializeBody(BinaryReader br)
|
||||
{
|
||||
msg_id = br.ReadInt32();
|
||||
MsgId = br.ReadInt32();
|
||||
|
||||
}
|
||||
|
||||
public override void SerializeBody(BinaryWriter bw)
|
||||
{
|
||||
bw.Write(Constructor);
|
||||
bw.Write(msg_id);
|
||||
bw.Write(MsgId);
|
||||
|
||||
}
|
||||
public override void deserializeResponse(BinaryReader br)
|
||||
public override void DeserializeResponse(BinaryReader br)
|
||||
{
|
||||
Response = (Payments.TLPaymentForm)ObjectUtils.DeserializeObject(br);
|
||||
|
||||
|
|
|
|||
|
|
@ -18,7 +18,7 @@ namespace TeleSharp.TL.Payments
|
|||
}
|
||||
}
|
||||
|
||||
public int msg_id { get; set; }
|
||||
public int MsgId { get; set; }
|
||||
public Payments.TLPaymentReceipt Response { get; set; }
|
||||
|
||||
|
||||
|
|
@ -29,17 +29,17 @@ namespace TeleSharp.TL.Payments
|
|||
|
||||
public override void DeserializeBody(BinaryReader br)
|
||||
{
|
||||
msg_id = br.ReadInt32();
|
||||
MsgId = br.ReadInt32();
|
||||
|
||||
}
|
||||
|
||||
public override void SerializeBody(BinaryWriter bw)
|
||||
{
|
||||
bw.Write(Constructor);
|
||||
bw.Write(msg_id);
|
||||
bw.Write(MsgId);
|
||||
|
||||
}
|
||||
public override void deserializeResponse(BinaryReader br)
|
||||
public override void DeserializeResponse(BinaryReader br)
|
||||
{
|
||||
Response = (Payments.TLPaymentReceipt)ObjectUtils.DeserializeObject(br);
|
||||
|
||||
|
|
|
|||
|
|
@ -36,7 +36,7 @@ namespace TeleSharp.TL.Payments
|
|||
bw.Write(Constructor);
|
||||
|
||||
}
|
||||
public override void deserializeResponse(BinaryReader br)
|
||||
public override void DeserializeResponse(BinaryReader br)
|
||||
{
|
||||
Response = (Payments.TLSavedInfo)ObjectUtils.DeserializeObject(br);
|
||||
|
||||
|
|
|
|||
|
|
@ -18,37 +18,37 @@ namespace TeleSharp.TL.Payments
|
|||
}
|
||||
}
|
||||
|
||||
public int flags { get; set; }
|
||||
public int msg_id { get; set; }
|
||||
public string requested_info_id { get; set; }
|
||||
public string shipping_option_id { get; set; }
|
||||
public TLAbsInputPaymentCredentials credentials { get; set; }
|
||||
public int Flags { get; set; }
|
||||
public int MsgId { get; set; }
|
||||
public string RequestedInfoId { get; set; }
|
||||
public string ShippingOptionId { get; set; }
|
||||
public TLAbsInputPaymentCredentials Credentials { get; set; }
|
||||
public Payments.TLAbsPaymentResult Response { get; set; }
|
||||
|
||||
|
||||
public void ComputeFlags()
|
||||
{
|
||||
flags = 0;
|
||||
flags = requested_info_id != null ? (flags | 1) : (flags & ~1);
|
||||
flags = shipping_option_id != null ? (flags | 2) : (flags & ~2);
|
||||
Flags = 0;
|
||||
Flags = RequestedInfoId != null ? (Flags | 1) : (Flags & ~1);
|
||||
Flags = ShippingOptionId != null ? (Flags | 2) : (Flags & ~2);
|
||||
|
||||
}
|
||||
|
||||
public override void DeserializeBody(BinaryReader br)
|
||||
{
|
||||
flags = br.ReadInt32();
|
||||
msg_id = br.ReadInt32();
|
||||
if ((flags & 1) != 0)
|
||||
requested_info_id = StringUtil.Deserialize(br);
|
||||
Flags = br.ReadInt32();
|
||||
MsgId = br.ReadInt32();
|
||||
if ((Flags & 1) != 0)
|
||||
RequestedInfoId = StringUtil.Deserialize(br);
|
||||
else
|
||||
requested_info_id = null;
|
||||
RequestedInfoId = null;
|
||||
|
||||
if ((flags & 2) != 0)
|
||||
shipping_option_id = StringUtil.Deserialize(br);
|
||||
if ((Flags & 2) != 0)
|
||||
ShippingOptionId = StringUtil.Deserialize(br);
|
||||
else
|
||||
shipping_option_id = null;
|
||||
ShippingOptionId = null;
|
||||
|
||||
credentials = (TLAbsInputPaymentCredentials)ObjectUtils.DeserializeObject(br);
|
||||
Credentials = (TLAbsInputPaymentCredentials)ObjectUtils.DeserializeObject(br);
|
||||
|
||||
}
|
||||
|
||||
|
|
@ -56,16 +56,16 @@ namespace TeleSharp.TL.Payments
|
|||
{
|
||||
bw.Write(Constructor);
|
||||
ComputeFlags();
|
||||
bw.Write(flags);
|
||||
bw.Write(msg_id);
|
||||
if ((flags & 1) != 0)
|
||||
StringUtil.Serialize(requested_info_id, bw);
|
||||
if ((flags & 2) != 0)
|
||||
StringUtil.Serialize(shipping_option_id, bw);
|
||||
ObjectUtils.SerializeObject(credentials, bw);
|
||||
bw.Write(Flags);
|
||||
bw.Write(MsgId);
|
||||
if ((Flags & 1) != 0)
|
||||
StringUtil.Serialize(RequestedInfoId, bw);
|
||||
if ((Flags & 2) != 0)
|
||||
StringUtil.Serialize(ShippingOptionId, bw);
|
||||
ObjectUtils.SerializeObject(Credentials, bw);
|
||||
|
||||
}
|
||||
public override void deserializeResponse(BinaryReader br)
|
||||
public override void DeserializeResponse(BinaryReader br)
|
||||
{
|
||||
Response = (Payments.TLAbsPaymentResult)ObjectUtils.DeserializeObject(br);
|
||||
|
||||
|
|
|
|||
|
|
@ -18,26 +18,26 @@ namespace TeleSharp.TL.Payments
|
|||
}
|
||||
}
|
||||
|
||||
public int flags { get; set; }
|
||||
public bool save { get; set; }
|
||||
public int msg_id { get; set; }
|
||||
public TLPaymentRequestedInfo info { get; set; }
|
||||
public int Flags { get; set; }
|
||||
public bool Save { get; set; }
|
||||
public int MsgId { get; set; }
|
||||
public TLPaymentRequestedInfo Info { get; set; }
|
||||
public Payments.TLValidatedRequestedInfo Response { get; set; }
|
||||
|
||||
|
||||
public void ComputeFlags()
|
||||
{
|
||||
flags = 0;
|
||||
flags = save ? (flags | 1) : (flags & ~1);
|
||||
Flags = 0;
|
||||
Flags = Save ? (Flags | 1) : (Flags & ~1);
|
||||
|
||||
}
|
||||
|
||||
public override void DeserializeBody(BinaryReader br)
|
||||
{
|
||||
flags = br.ReadInt32();
|
||||
save = (flags & 1) != 0;
|
||||
msg_id = br.ReadInt32();
|
||||
info = (TLPaymentRequestedInfo)ObjectUtils.DeserializeObject(br);
|
||||
Flags = br.ReadInt32();
|
||||
Save = (Flags & 1) != 0;
|
||||
MsgId = br.ReadInt32();
|
||||
Info = (TLPaymentRequestedInfo)ObjectUtils.DeserializeObject(br);
|
||||
|
||||
}
|
||||
|
||||
|
|
@ -45,13 +45,13 @@ namespace TeleSharp.TL.Payments
|
|||
{
|
||||
bw.Write(Constructor);
|
||||
ComputeFlags();
|
||||
bw.Write(flags);
|
||||
bw.Write(Flags);
|
||||
|
||||
bw.Write(msg_id);
|
||||
ObjectUtils.SerializeObject(info, bw);
|
||||
bw.Write(MsgId);
|
||||
ObjectUtils.SerializeObject(Info, bw);
|
||||
|
||||
}
|
||||
public override void deserializeResponse(BinaryReader br)
|
||||
public override void DeserializeResponse(BinaryReader br)
|
||||
{
|
||||
Response = (Payments.TLValidatedRequestedInfo)ObjectUtils.DeserializeObject(br);
|
||||
|
||||
|
|
|
|||
|
|
@ -18,27 +18,27 @@ namespace TeleSharp.TL.Payments
|
|||
}
|
||||
}
|
||||
|
||||
public int flags { get; set; }
|
||||
public bool has_saved_credentials { get; set; }
|
||||
public TLPaymentRequestedInfo saved_info { get; set; }
|
||||
public int Flags { get; set; }
|
||||
public bool HasSavedCredentials { get; set; }
|
||||
public TLPaymentRequestedInfo SavedInfo { get; set; }
|
||||
|
||||
|
||||
public void ComputeFlags()
|
||||
{
|
||||
flags = 0;
|
||||
flags = has_saved_credentials ? (flags | 2) : (flags & ~2);
|
||||
flags = saved_info != null ? (flags | 1) : (flags & ~1);
|
||||
Flags = 0;
|
||||
Flags = HasSavedCredentials ? (Flags | 2) : (Flags & ~2);
|
||||
Flags = SavedInfo != null ? (Flags | 1) : (Flags & ~1);
|
||||
|
||||
}
|
||||
|
||||
public override void DeserializeBody(BinaryReader br)
|
||||
{
|
||||
flags = br.ReadInt32();
|
||||
has_saved_credentials = (flags & 2) != 0;
|
||||
if ((flags & 1) != 0)
|
||||
saved_info = (TLPaymentRequestedInfo)ObjectUtils.DeserializeObject(br);
|
||||
Flags = br.ReadInt32();
|
||||
HasSavedCredentials = (Flags & 2) != 0;
|
||||
if ((Flags & 1) != 0)
|
||||
SavedInfo = (TLPaymentRequestedInfo)ObjectUtils.DeserializeObject(br);
|
||||
else
|
||||
saved_info = null;
|
||||
SavedInfo = null;
|
||||
|
||||
|
||||
}
|
||||
|
|
@ -47,10 +47,10 @@ namespace TeleSharp.TL.Payments
|
|||
{
|
||||
bw.Write(Constructor);
|
||||
ComputeFlags();
|
||||
bw.Write(flags);
|
||||
bw.Write(Flags);
|
||||
|
||||
if ((flags & 1) != 0)
|
||||
ObjectUtils.SerializeObject(saved_info, bw);
|
||||
if ((Flags & 1) != 0)
|
||||
ObjectUtils.SerializeObject(SavedInfo, bw);
|
||||
|
||||
}
|
||||
}
|
||||
|
|
|
|||
|
|
@ -18,31 +18,31 @@ namespace TeleSharp.TL.Payments
|
|||
}
|
||||
}
|
||||
|
||||
public int flags { get; set; }
|
||||
public string id { get; set; }
|
||||
public TLVector<TLShippingOption> shipping_options { get; set; }
|
||||
public int Flags { get; set; }
|
||||
public string Id { get; set; }
|
||||
public TLVector<TLShippingOption> ShippingOptions { get; set; }
|
||||
|
||||
|
||||
public void ComputeFlags()
|
||||
{
|
||||
flags = 0;
|
||||
flags = id != null ? (flags | 1) : (flags & ~1);
|
||||
flags = shipping_options != null ? (flags | 2) : (flags & ~2);
|
||||
Flags = 0;
|
||||
Flags = Id != null ? (Flags | 1) : (Flags & ~1);
|
||||
Flags = ShippingOptions != null ? (Flags | 2) : (Flags & ~2);
|
||||
|
||||
}
|
||||
|
||||
public override void DeserializeBody(BinaryReader br)
|
||||
{
|
||||
flags = br.ReadInt32();
|
||||
if ((flags & 1) != 0)
|
||||
id = StringUtil.Deserialize(br);
|
||||
Flags = br.ReadInt32();
|
||||
if ((Flags & 1) != 0)
|
||||
Id = StringUtil.Deserialize(br);
|
||||
else
|
||||
id = null;
|
||||
Id = null;
|
||||
|
||||
if ((flags & 2) != 0)
|
||||
shipping_options = (TLVector<TLShippingOption>)ObjectUtils.DeserializeVector<TLShippingOption>(br);
|
||||
if ((Flags & 2) != 0)
|
||||
ShippingOptions = (TLVector<TLShippingOption>)ObjectUtils.DeserializeVector<TLShippingOption>(br);
|
||||
else
|
||||
shipping_options = null;
|
||||
ShippingOptions = null;
|
||||
|
||||
|
||||
}
|
||||
|
|
@ -51,11 +51,11 @@ namespace TeleSharp.TL.Payments
|
|||
{
|
||||
bw.Write(Constructor);
|
||||
ComputeFlags();
|
||||
bw.Write(flags);
|
||||
if ((flags & 1) != 0)
|
||||
StringUtil.Serialize(id, bw);
|
||||
if ((flags & 2) != 0)
|
||||
ObjectUtils.SerializeObject(shipping_options, bw);
|
||||
bw.Write(Flags);
|
||||
if ((Flags & 1) != 0)
|
||||
StringUtil.Serialize(Id, bw);
|
||||
if ((Flags & 2) != 0)
|
||||
ObjectUtils.SerializeObject(ShippingOptions, bw);
|
||||
|
||||
}
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue