TLSharp/TeleSharp.TL/TL/TLPhotoSize.cs

40 lines
1 KiB
C#
Raw Normal View History

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