mirror of
https://github.com/sochix/TLSharp.git
synced 2026-04-04 14:08:35 +00:00
parent
0d55940c12
commit
133b9fdf6c
784 changed files with 17201 additions and 10048 deletions
57
TeleSharp.TL/TL/Payments/TLSavedInfo.cs
Normal file
57
TeleSharp.TL/TL/Payments/TLSavedInfo.cs
Normal file
|
|
@ -0,0 +1,57 @@
|
|||
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.Payments
|
||||
{
|
||||
[TLObject(-74456004)]
|
||||
public class TLSavedInfo : TLObject
|
||||
{
|
||||
public override int Constructor
|
||||
{
|
||||
get
|
||||
{
|
||||
return -74456004;
|
||||
}
|
||||
}
|
||||
|
||||
public int flags { get; set; }
|
||||
public bool has_saved_credentials { get; set; }
|
||||
public TLPaymentRequestedInfo saved_info { get; set; }
|
||||
|
||||
|
||||
public void ComputeFlags()
|
||||
{
|
||||
flags = 0;
|
||||
flags = has_saved_credentials ? (flags | 2) : (flags & ~2);
|
||||
flags = saved_info != 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);
|
||||
else
|
||||
saved_info = null;
|
||||
|
||||
|
||||
}
|
||||
|
||||
public override void SerializeBody(BinaryWriter bw)
|
||||
{
|
||||
bw.Write(Constructor);
|
||||
ComputeFlags();
|
||||
bw.Write(flags);
|
||||
|
||||
if ((flags & 1) != 0)
|
||||
ObjectUtils.SerializeObject(saved_info, bw);
|
||||
|
||||
}
|
||||
}
|
||||
}
|
||||
Loading…
Add table
Add a link
Reference in a new issue