TLSharp/TeleSharp.TL/TL/Messages/TLRequestGetDialogs.cs

67 lines
1.5 KiB
C#
Raw Normal View History

2016-09-24 15:38:26 +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.Messages
{
2017-07-10 15:52:00 +02:00
[TLObject(421243333)]
2016-09-24 15:38:26 +02:00
public class TLRequestGetDialogs : TLMethod
{
public override int Constructor
{
get
{
2017-07-10 15:52:00 +02:00
return 421243333;
2016-09-24 15:38:26 +02:00
}
}
2017-07-10 15:52:00 +02:00
public int flags {get;set;}
public bool exclude_pinned {get;set;}
public int offset_date {get;set;}
2016-09-24 15:38:26 +02:00
public int offset_id {get;set;}
public TLAbsInputPeer offset_peer {get;set;}
public int limit {get;set;}
public Messages.TLAbsDialogs Response{ get; set;}
public void ComputeFlags()
{
2017-07-10 15:52:00 +02:00
flags = 0;
flags = exclude_pinned ? (flags | 1) : (flags & ~1);
2016-09-24 15:38:26 +02:00
}
public override void DeserializeBody(BinaryReader br)
{
2017-07-10 15:52:00 +02:00
flags = br.ReadInt32();
exclude_pinned = (flags & 1) != 0;
offset_date = br.ReadInt32();
2016-09-24 15:38:26 +02:00
offset_id = br.ReadInt32();
offset_peer = (TLAbsInputPeer)ObjectUtils.DeserializeObject(br);
limit = br.ReadInt32();
}
public override void SerializeBody(BinaryWriter bw)
{
bw.Write(Constructor);
2017-07-10 15:52:00 +02:00
ComputeFlags();
bw.Write(flags);
bw.Write(offset_date);
2016-09-24 15:38:26 +02:00
bw.Write(offset_id);
ObjectUtils.SerializeObject(offset_peer,bw);
bw.Write(limit);
}
public override void deserializeResponse(BinaryReader br)
{
Response = (Messages.TLAbsDialogs)ObjectUtils.DeserializeObject(br);
}
}
}