mirror of
https://github.com/sochix/TLSharp.git
synced 2026-04-06 06:55:06 +00:00
Generator Must Respect MS .NET API guidelines
This commit is contained in:
parent
3ba3ea53fd
commit
d769dd3c2f
646 changed files with 7213 additions and 7166 deletions
|
|
@ -18,36 +18,36 @@ namespace TeleSharp.TL
|
|||
}
|
||||
}
|
||||
|
||||
public int flags { get; set; }
|
||||
public long id { get; set; }
|
||||
public long access_hash { get; set; }
|
||||
public string short_name { get; set; }
|
||||
public string title { get; set; }
|
||||
public string description { get; set; }
|
||||
public TLAbsPhoto photo { get; set; }
|
||||
public TLAbsDocument document { get; set; }
|
||||
public int Flags { get; set; }
|
||||
public long Id { get; set; }
|
||||
public long AccessHash { get; set; }
|
||||
public string ShortName { get; set; }
|
||||
public string Title { get; set; }
|
||||
public string Description { get; set; }
|
||||
public TLAbsPhoto Photo { get; set; }
|
||||
public TLAbsDocument Document { get; set; }
|
||||
|
||||
|
||||
public void ComputeFlags()
|
||||
{
|
||||
flags = 0;
|
||||
flags = document != null ? (flags | 1) : (flags & ~1);
|
||||
Flags = 0;
|
||||
Flags = Document != null ? (Flags | 1) : (Flags & ~1);
|
||||
|
||||
}
|
||||
|
||||
public override void DeserializeBody(BinaryReader br)
|
||||
{
|
||||
flags = br.ReadInt32();
|
||||
id = br.ReadInt64();
|
||||
access_hash = br.ReadInt64();
|
||||
short_name = StringUtil.Deserialize(br);
|
||||
title = StringUtil.Deserialize(br);
|
||||
description = StringUtil.Deserialize(br);
|
||||
photo = (TLAbsPhoto)ObjectUtils.DeserializeObject(br);
|
||||
if ((flags & 1) != 0)
|
||||
document = (TLAbsDocument)ObjectUtils.DeserializeObject(br);
|
||||
Flags = br.ReadInt32();
|
||||
Id = br.ReadInt64();
|
||||
AccessHash = br.ReadInt64();
|
||||
ShortName = StringUtil.Deserialize(br);
|
||||
Title = StringUtil.Deserialize(br);
|
||||
Description = StringUtil.Deserialize(br);
|
||||
Photo = (TLAbsPhoto)ObjectUtils.DeserializeObject(br);
|
||||
if ((Flags & 1) != 0)
|
||||
Document = (TLAbsDocument)ObjectUtils.DeserializeObject(br);
|
||||
else
|
||||
document = null;
|
||||
Document = null;
|
||||
|
||||
|
||||
}
|
||||
|
|
@ -56,15 +56,15 @@ namespace TeleSharp.TL
|
|||
{
|
||||
bw.Write(Constructor);
|
||||
ComputeFlags();
|
||||
bw.Write(flags);
|
||||
bw.Write(id);
|
||||
bw.Write(access_hash);
|
||||
StringUtil.Serialize(short_name, bw);
|
||||
StringUtil.Serialize(title, bw);
|
||||
StringUtil.Serialize(description, bw);
|
||||
ObjectUtils.SerializeObject(photo, bw);
|
||||
if ((flags & 1) != 0)
|
||||
ObjectUtils.SerializeObject(document, bw);
|
||||
bw.Write(Flags);
|
||||
bw.Write(Id);
|
||||
bw.Write(AccessHash);
|
||||
StringUtil.Serialize(ShortName, bw);
|
||||
StringUtil.Serialize(Title, bw);
|
||||
StringUtil.Serialize(Description, bw);
|
||||
ObjectUtils.SerializeObject(Photo, bw);
|
||||
if ((Flags & 1) != 0)
|
||||
ObjectUtils.SerializeObject(Document, bw);
|
||||
|
||||
}
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue