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(-686710068)]
|
2017-07-10 15:52:00 +02:00
|
|
|
public class TLUpdateDialogPinned : TLAbsUpdate
|
|
|
|
|
{
|
|
|
|
|
public override int Constructor
|
|
|
|
|
{
|
|
|
|
|
get
|
|
|
|
|
{
|
|
|
|
|
return -686710068;
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
|
2017-07-20 00:36:50 +02:00
|
|
|
public int flags { get; set; }
|
|
|
|
|
public bool pinned { get; set; }
|
|
|
|
|
public TLAbsPeer peer { get; set; }
|
2017-07-10 15:52:00 +02:00
|
|
|
|
|
|
|
|
|
2017-07-20 00:36:50 +02:00
|
|
|
public void ComputeFlags()
|
|
|
|
|
{
|
|
|
|
|
flags = 0;
|
|
|
|
|
flags = pinned ? (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
|
|
|
pinned = (flags & 1) != 0;
|
|
|
|
|
peer = (TLAbsPeer)ObjectUtils.DeserializeObject(br);
|
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);
|
2017-07-10 15:52:00 +02:00
|
|
|
|
2017-07-20 00:36:50 +02:00
|
|
|
ObjectUtils.SerializeObject(peer, bw);
|
2017-07-10 15:52:00 +02:00
|
|
|
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
}
|