TLSharp/TeleSharp.TL/TL/TLPhotoSize.cs

40 lines
1 KiB
C#
Raw Normal View History

2016-09-24 15:38:26 +02:00
using System.IO;
2017-04-13 08:38:01 +02:00
2016-09-24 15:38:26 +02:00
namespace TeleSharp.TL
{
2017-04-13 08:38:01 +02:00
[TLObject(2009052699)]
2016-09-24 15:38:26 +02:00
public class TLPhotoSize : TLAbsPhotoSize
{
2017-04-13 08:38:01 +02:00
public override int Constructor => 2009052699;
2016-09-24 15:38:26 +02:00
2017-04-13 08:38:01 +02:00
public string type { get; set; }
public TLAbsFileLocation location { get; set; }
public int w { get; set; }
public int h { get; set; }
public int size { get; set; }
2016-09-24 15:38:26 +02:00
2017-04-13 08:38:01 +02:00
public void ComputeFlags()
{
}
2016-09-24 15:38:26 +02:00
public override void DeserializeBody(BinaryReader br)
{
type = StringUtil.Deserialize(br);
2017-04-13 08:38:01 +02:00
location = (TLAbsFileLocation) ObjectUtils.DeserializeObject(br);
w = br.ReadInt32();
h = br.ReadInt32();
size = br.ReadInt32();
2016-09-24 15:38:26 +02:00
}
public override void SerializeBody(BinaryWriter bw)
{
2017-04-13 08:38:01 +02:00
bw.Write(Constructor);
StringUtil.Serialize(type, bw);
ObjectUtils.SerializeObject(location, bw);
bw.Write(w);
bw.Write(h);
bw.Write(size);
2016-09-24 15:38:26 +02:00
}
}
2017-04-13 08:38:01 +02:00
}