mirror of
https://github.com/sochix/TLSharp.git
synced 2026-04-07 15:36:23 +00:00
Layer-57
This commit is contained in:
parent
0752c60082
commit
23e647e81c
81 changed files with 2631 additions and 213 deletions
|
|
@ -7,18 +7,19 @@ using System.Threading.Tasks;
|
|||
using TeleSharp.TL;
|
||||
namespace TeleSharp.TL
|
||||
{
|
||||
[TLObject(-918482040)]
|
||||
[TLObject(-1704251862)]
|
||||
public class TLConfig : TLObject
|
||||
{
|
||||
public override int Constructor
|
||||
{
|
||||
get
|
||||
{
|
||||
return -918482040;
|
||||
return -1704251862;
|
||||
}
|
||||
}
|
||||
|
||||
public int date {get;set;}
|
||||
public int flags {get;set;}
|
||||
public int date {get;set;}
|
||||
public int expires {get;set;}
|
||||
public bool test_mode {get;set;}
|
||||
public int this_dc {get;set;}
|
||||
|
|
@ -38,17 +39,22 @@ namespace TeleSharp.TL
|
|||
public int saved_gifs_limit {get;set;}
|
||||
public int edit_time_limit {get;set;}
|
||||
public int rating_e_decay {get;set;}
|
||||
public int stickers_recent_limit {get;set;}
|
||||
public int? tmp_sessions {get;set;}
|
||||
public TLVector<TLDisabledFeature> disabled_features {get;set;}
|
||||
|
||||
|
||||
public void ComputeFlags()
|
||||
{
|
||||
|
||||
flags = 0;
|
||||
flags = tmp_sessions != null ? (flags | 1) : (flags & ~1);
|
||||
|
||||
}
|
||||
|
||||
public override void DeserializeBody(BinaryReader br)
|
||||
{
|
||||
date = br.ReadInt32();
|
||||
flags = br.ReadInt32();
|
||||
date = br.ReadInt32();
|
||||
expires = br.ReadInt32();
|
||||
test_mode = BoolUtil.Deserialize(br);
|
||||
this_dc = br.ReadInt32();
|
||||
|
|
@ -68,6 +74,12 @@ push_chat_limit = br.ReadInt32();
|
|||
saved_gifs_limit = br.ReadInt32();
|
||||
edit_time_limit = br.ReadInt32();
|
||||
rating_e_decay = br.ReadInt32();
|
||||
stickers_recent_limit = br.ReadInt32();
|
||||
if ((flags & 1) != 0)
|
||||
tmp_sessions = br.ReadInt32();
|
||||
else
|
||||
tmp_sessions = null;
|
||||
|
||||
disabled_features = (TLVector<TLDisabledFeature>)ObjectUtils.DeserializeVector<TLDisabledFeature>(br);
|
||||
|
||||
}
|
||||
|
|
@ -75,7 +87,9 @@ disabled_features = (TLVector<TLDisabledFeature>)ObjectUtils.DeserializeVector<T
|
|||
public override void SerializeBody(BinaryWriter bw)
|
||||
{
|
||||
bw.Write(Constructor);
|
||||
bw.Write(date);
|
||||
ComputeFlags();
|
||||
bw.Write(flags);
|
||||
bw.Write(date);
|
||||
bw.Write(expires);
|
||||
BoolUtil.Serialize(test_mode,bw);
|
||||
bw.Write(this_dc);
|
||||
|
|
@ -95,6 +109,9 @@ bw.Write(push_chat_limit);
|
|||
bw.Write(saved_gifs_limit);
|
||||
bw.Write(edit_time_limit);
|
||||
bw.Write(rating_e_decay);
|
||||
bw.Write(stickers_recent_limit);
|
||||
if ((flags & 1) != 0)
|
||||
bw.Write(tmp_sessions.Value);
|
||||
ObjectUtils.SerializeObject(disabled_features,bw);
|
||||
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue