TLSharp/TeleSharp.TL/TL/Updates/TLRequestGetChannelDifference.cs

67 lines
1.6 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.Updates
{
2017-07-10 15:52:00 +02:00
[TLObject(51854712)]
2016-09-24 15:38:26 +02:00
public class TLRequestGetChannelDifference : TLMethod
{
public override int Constructor
{
get
{
2017-07-10 15:52:00 +02:00
return 51854712;
2016-09-24 15:38:26 +02:00
}
}
2017-07-10 15:52:00 +02:00
public int flags {get;set;}
public bool force {get;set;}
public TLAbsInputChannel channel {get;set;}
2016-09-24 15:38:26 +02:00
public TLAbsChannelMessagesFilter filter {get;set;}
public int pts {get;set;}
public int limit {get;set;}
public Updates.TLAbsChannelDifference Response{ get; set;}
public void ComputeFlags()
{
2017-07-10 15:52:00 +02:00
flags = 0;
flags = force ? (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();
force = (flags & 1) != 0;
channel = (TLAbsInputChannel)ObjectUtils.DeserializeObject(br);
2016-09-24 15:38:26 +02:00
filter = (TLAbsChannelMessagesFilter)ObjectUtils.DeserializeObject(br);
pts = br.ReadInt32();
limit = br.ReadInt32();
}
public override void SerializeBody(BinaryWriter bw)
{
bw.Write(Constructor);
2017-07-10 15:52:00 +02:00
ComputeFlags();
bw.Write(flags);
ObjectUtils.SerializeObject(channel,bw);
2016-09-24 15:38:26 +02:00
ObjectUtils.SerializeObject(filter,bw);
bw.Write(pts);
bw.Write(limit);
}
public override void deserializeResponse(BinaryReader br)
{
Response = (Updates.TLAbsChannelDifference)ObjectUtils.DeserializeObject(br);
}
}
}