mirror of
https://github.com/sochix/TLSharp.git
synced 2026-04-07 23:45:09 +00:00
apply resharper's code style
This commit is contained in:
parent
1697db9d7f
commit
7fad829dd2
776 changed files with 14393 additions and 24502 deletions
|
|
@ -1,84 +1,70 @@
|
|||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.IO;
|
||||
using System.Linq;
|
||||
using System.Text;
|
||||
using System.Threading.Tasks;
|
||||
using TeleSharp.TL;
|
||||
using TeleSharp.TL.Contacts;
|
||||
|
||||
namespace TeleSharp.TL
|
||||
{
|
||||
[TLObject(1496513539)]
|
||||
[TLObject(1496513539)]
|
||||
public class TLUserFull : TLObject
|
||||
{
|
||||
public override int Constructor
|
||||
public override int Constructor => 1496513539;
|
||||
|
||||
public int flags { get; set; }
|
||||
public bool blocked { get; set; }
|
||||
public TLAbsUser user { get; set; }
|
||||
public string about { get; set; }
|
||||
public TLLink link { get; set; }
|
||||
public TLAbsPhoto profile_photo { get; set; }
|
||||
public TLAbsPeerNotifySettings notify_settings { get; set; }
|
||||
public TLBotInfo bot_info { get; set; }
|
||||
|
||||
|
||||
public void ComputeFlags()
|
||||
{
|
||||
get
|
||||
{
|
||||
return 1496513539;
|
||||
}
|
||||
flags = 0;
|
||||
flags = blocked ? flags | 1 : flags & ~1;
|
||||
flags = about != null ? flags | 2 : flags & ~2;
|
||||
flags = profile_photo != null ? flags | 4 : flags & ~4;
|
||||
flags = bot_info != null ? flags | 8 : flags & ~8;
|
||||
}
|
||||
|
||||
public int flags {get;set;}
|
||||
public bool blocked {get;set;}
|
||||
public TLAbsUser user {get;set;}
|
||||
public string about {get;set;}
|
||||
public Contacts.TLLink link {get;set;}
|
||||
public TLAbsPhoto profile_photo {get;set;}
|
||||
public TLAbsPeerNotifySettings notify_settings {get;set;}
|
||||
public TLBotInfo bot_info {get;set;}
|
||||
|
||||
|
||||
public void ComputeFlags()
|
||||
{
|
||||
flags = 0;
|
||||
flags = blocked ? (flags | 1) : (flags & ~1);
|
||||
flags = about != null ? (flags | 2) : (flags & ~2);
|
||||
flags = profile_photo != null ? (flags | 4) : (flags & ~4);
|
||||
flags = bot_info != null ? (flags | 8) : (flags & ~8);
|
||||
|
||||
}
|
||||
|
||||
public override void DeserializeBody(BinaryReader br)
|
||||
{
|
||||
flags = br.ReadInt32();
|
||||
blocked = (flags & 1) != 0;
|
||||
user = (TLAbsUser)ObjectUtils.DeserializeObject(br);
|
||||
if ((flags & 2) != 0)
|
||||
about = StringUtil.Deserialize(br);
|
||||
else
|
||||
about = null;
|
||||
|
||||
link = (Contacts.TLLink)ObjectUtils.DeserializeObject(br);
|
||||
if ((flags & 4) != 0)
|
||||
profile_photo = (TLAbsPhoto)ObjectUtils.DeserializeObject(br);
|
||||
else
|
||||
profile_photo = null;
|
||||
|
||||
notify_settings = (TLAbsPeerNotifySettings)ObjectUtils.DeserializeObject(br);
|
||||
if ((flags & 8) != 0)
|
||||
bot_info = (TLBotInfo)ObjectUtils.DeserializeObject(br);
|
||||
else
|
||||
bot_info = null;
|
||||
blocked = (flags & 1) != 0;
|
||||
user = (TLAbsUser) ObjectUtils.DeserializeObject(br);
|
||||
if ((flags & 2) != 0)
|
||||
about = StringUtil.Deserialize(br);
|
||||
else
|
||||
about = null;
|
||||
|
||||
link = (TLLink) ObjectUtils.DeserializeObject(br);
|
||||
if ((flags & 4) != 0)
|
||||
profile_photo = (TLAbsPhoto) ObjectUtils.DeserializeObject(br);
|
||||
else
|
||||
profile_photo = null;
|
||||
|
||||
notify_settings = (TLAbsPeerNotifySettings) ObjectUtils.DeserializeObject(br);
|
||||
if ((flags & 8) != 0)
|
||||
bot_info = (TLBotInfo) ObjectUtils.DeserializeObject(br);
|
||||
else
|
||||
bot_info = null;
|
||||
}
|
||||
|
||||
public override void SerializeBody(BinaryWriter bw)
|
||||
{
|
||||
bw.Write(Constructor);
|
||||
bw.Write(Constructor);
|
||||
ComputeFlags();
|
||||
bw.Write(flags);
|
||||
|
||||
ObjectUtils.SerializeObject(user,bw);
|
||||
if ((flags & 2) != 0)
|
||||
StringUtil.Serialize(about,bw);
|
||||
ObjectUtils.SerializeObject(link,bw);
|
||||
if ((flags & 4) != 0)
|
||||
ObjectUtils.SerializeObject(profile_photo,bw);
|
||||
ObjectUtils.SerializeObject(notify_settings,bw);
|
||||
if ((flags & 8) != 0)
|
||||
ObjectUtils.SerializeObject(bot_info,bw);
|
||||
bw.Write(flags);
|
||||
|
||||
ObjectUtils.SerializeObject(user, bw);
|
||||
if ((flags & 2) != 0)
|
||||
StringUtil.Serialize(about, bw);
|
||||
ObjectUtils.SerializeObject(link, bw);
|
||||
if ((flags & 4) != 0)
|
||||
ObjectUtils.SerializeObject(profile_photo, bw);
|
||||
ObjectUtils.SerializeObject(notify_settings, bw);
|
||||
if ((flags & 8) != 0)
|
||||
ObjectUtils.SerializeObject(bot_info, bw);
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
Loading…
Add table
Add a link
Reference in a new issue