mirror of
https://github.com/sochix/TLSharp.git
synced 2025-12-06 08:02:00 +01:00
66 lines
1.7 KiB
C#
66 lines
1.7 KiB
C#
using System.IO;
|
|
|
|
namespace TeleSharp.TL
|
|
{
|
|
[TLObject(-2027738169)]
|
|
public class TLDocument : TLAbsDocument
|
|
{
|
|
public long AccessHash { get; set; }
|
|
|
|
public TLVector<TLAbsDocumentAttribute> Attributes { get; set; }
|
|
|
|
public override int Constructor
|
|
{
|
|
get
|
|
{
|
|
return -2027738169;
|
|
}
|
|
}
|
|
|
|
public int Date { get; set; }
|
|
|
|
public int DcId { get; set; }
|
|
|
|
public long Id { get; set; }
|
|
|
|
public string MimeType { get; set; }
|
|
|
|
public int Size { get; set; }
|
|
|
|
public TLAbsPhotoSize Thumb { get; set; }
|
|
|
|
public int Version { 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);
|
|
}
|
|
}
|
|
}
|