TLSharp/TeleSharp.TL/TL/TLDocument.cs
2017-11-09 19:37:09 +08:00

67 lines
1.8 KiB
C#

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
{
[TLObject(-2027738169)]
public class TLDocument : TLAbsDocument
{
public override int Constructor
{
get
{
return -2027738169;
}
}
public long Id { get; set; }
public long AccessHash { get; set; }
public int Date { get; set; }
public string MimeType { get; set; }
public int Size { get; set; }
public TLAbsPhotoSize Thumb { get; set; }
public int DcId { get; set; }
public int Version { get; set; }
public TLVector<TLAbsDocumentAttribute> Attributes { get; set; }
public void ComputeFlags()
{
}
public override void DeserializeBody(BinaryReader br)
{
Id = br.ReadInt64();
AccessHash = br.ReadInt64();
Date = br.ReadInt32();
MimeType = StringUtil.Deserialize(br);
Size = br.ReadInt32();
Thumb = (TLAbsPhotoSize)ObjectUtils.DeserializeObject(br);
DcId = br.ReadInt32();
Version = br.ReadInt32();
Attributes = (TLVector<TLAbsDocumentAttribute>)ObjectUtils.DeserializeVector<TLAbsDocumentAttribute>(br);
}
public override void SerializeBody(BinaryWriter bw)
{
bw.Write(Constructor);
bw.Write(Id);
bw.Write(AccessHash);
bw.Write(Date);
StringUtil.Serialize(MimeType, bw);
bw.Write(Size);
ObjectUtils.SerializeObject(Thumb, bw);
bw.Write(DcId);
bw.Write(Version);
ObjectUtils.SerializeObject(Attributes, bw);
}
}
}