TLSharp/TeleSharp.TL/TL/TLStickerSet.cs

74 lines
1.6 KiB
C#
Raw Normal View History

2016-09-24 15:38:26 +02:00
using System.IO;
2017-12-20 12:06:31 +01:00
2016-09-24 15:38:26 +02:00
namespace TeleSharp.TL
{
[TLObject(-852477119)]
2016-09-24 15:38:26 +02:00
public class TLStickerSet : TLObject
{
2017-12-20 12:06:31 +01:00
public long AccessHash { get; set; }
public bool Archived { get; set; }
2016-09-24 15:38:26 +02:00
public override int Constructor
{
get
{
return -852477119;
}
}
2017-12-20 12:06:31 +01:00
public int Count { get; set; }
public int Flags { get; set; }
2017-12-20 12:06:31 +01:00
public int Hash { get; set; }
public long Id { get; set; }
public bool Installed { get; set; }
2017-12-20 12:06:31 +01:00
public bool Masks { get; set; }
2017-12-20 12:06:31 +01:00
public bool Official { get; set; }
public string ShortName { get; set; }
2016-09-24 15:38:26 +02:00
2017-12-20 12:06:31 +01:00
public string Title { get; set; }
2016-09-24 15:38:26 +02:00
public void ComputeFlags()
{
}
2016-09-24 15:38:26 +02:00
public override void DeserializeBody(BinaryReader br)
{
Flags = br.ReadInt32();
Installed = (Flags & 1) != 0;
Archived = (Flags & 2) != 0;
Official = (Flags & 4) != 0;
Masks = (Flags & 8) != 0;
Id = br.ReadInt64();
AccessHash = br.ReadInt64();
Title = StringUtil.Deserialize(br);
ShortName = StringUtil.Deserialize(br);
Count = br.ReadInt32();
Hash = br.ReadInt32();
2016-09-24 15:38:26 +02:00
}
public override void SerializeBody(BinaryWriter bw)
{
bw.Write(Constructor);
bw.Write(Flags);
2016-09-24 15:38:26 +02:00
2016-10-13 19:33:16 +02:00
bw.Write(Id);
bw.Write(AccessHash);
StringUtil.Serialize(Title, bw);
StringUtil.Serialize(ShortName, bw);
bw.Write(Count);
bw.Write(Hash);
2016-09-24 15:38:26 +02:00
}
}
}