TLSharp/TeleSharp.TL/TL/TLUpdatePinnedDialogs.cs

54 lines
1.2 KiB
C#
Raw Normal View History

2017-07-10 15:52:00 +02:00
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
{
2017-07-20 00:36:50 +02:00
[TLObject(-657787251)]
2017-07-10 15:52:00 +02:00
public class TLUpdatePinnedDialogs : TLAbsUpdate
{
public override int Constructor
{
get
{
return -657787251;
}
}
2017-07-20 00:36:50 +02:00
public int flags { get; set; }
public TLVector<TLAbsPeer> order { get; set; }
2017-07-10 15:52:00 +02:00
2017-07-20 00:36:50 +02:00
public void ComputeFlags()
{
flags = 0;
flags = order != null ? (flags | 1) : (flags & ~1);
2017-07-10 15:52:00 +02:00
2017-07-20 00:36:50 +02:00
}
2017-07-10 15:52:00 +02:00
public override void DeserializeBody(BinaryReader br)
{
flags = br.ReadInt32();
2017-07-20 00:36:50 +02:00
if ((flags & 1) != 0)
order = (TLVector<TLAbsPeer>)ObjectUtils.DeserializeVector<TLAbsPeer>(br);
else
order = null;
2017-07-10 15:52:00 +02:00
}
public override void SerializeBody(BinaryWriter bw)
{
2017-07-20 00:36:50 +02:00
bw.Write(Constructor);
2017-07-10 15:52:00 +02:00
ComputeFlags();
2017-07-20 00:36:50 +02:00
bw.Write(flags);
if ((flags & 1) != 0)
ObjectUtils.SerializeObject(order, bw);
2017-07-10 15:52:00 +02:00
}
}
}