mirror of
https://github.com/sochix/TLSharp.git
synced 2026-04-08 16:05:53 +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,80 +1,65 @@
|
|||
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(1728035348)]
|
||||
[TLObject(1728035348)]
|
||||
public class TLDialog : TLObject
|
||||
{
|
||||
public override int Constructor
|
||||
public override int Constructor => 1728035348;
|
||||
|
||||
public int flags { get; set; }
|
||||
public TLAbsPeer peer { get; set; }
|
||||
public int top_message { get; set; }
|
||||
public int read_inbox_max_id { get; set; }
|
||||
public int read_outbox_max_id { get; set; }
|
||||
public int unread_count { get; set; }
|
||||
public TLAbsPeerNotifySettings notify_settings { get; set; }
|
||||
public int? pts { get; set; }
|
||||
public TLAbsDraftMessage draft { get; set; }
|
||||
|
||||
|
||||
public void ComputeFlags()
|
||||
{
|
||||
get
|
||||
{
|
||||
return 1728035348;
|
||||
}
|
||||
flags = 0;
|
||||
flags = pts != null ? flags | 1 : flags & ~1;
|
||||
flags = draft != null ? flags | 2 : flags & ~2;
|
||||
}
|
||||
|
||||
public int flags {get;set;}
|
||||
public TLAbsPeer peer {get;set;}
|
||||
public int top_message {get;set;}
|
||||
public int read_inbox_max_id {get;set;}
|
||||
public int read_outbox_max_id {get;set;}
|
||||
public int unread_count {get;set;}
|
||||
public TLAbsPeerNotifySettings notify_settings {get;set;}
|
||||
public int? pts {get;set;}
|
||||
public TLAbsDraftMessage draft {get;set;}
|
||||
|
||||
|
||||
public void ComputeFlags()
|
||||
{
|
||||
flags = 0;
|
||||
flags = pts != null ? (flags | 1) : (flags & ~1);
|
||||
flags = draft != null ? (flags | 2) : (flags & ~2);
|
||||
|
||||
}
|
||||
|
||||
public override void DeserializeBody(BinaryReader br)
|
||||
{
|
||||
flags = br.ReadInt32();
|
||||
peer = (TLAbsPeer)ObjectUtils.DeserializeObject(br);
|
||||
top_message = br.ReadInt32();
|
||||
read_inbox_max_id = br.ReadInt32();
|
||||
read_outbox_max_id = br.ReadInt32();
|
||||
unread_count = br.ReadInt32();
|
||||
notify_settings = (TLAbsPeerNotifySettings)ObjectUtils.DeserializeObject(br);
|
||||
if ((flags & 1) != 0)
|
||||
pts = br.ReadInt32();
|
||||
else
|
||||
pts = null;
|
||||
|
||||
if ((flags & 2) != 0)
|
||||
draft = (TLAbsDraftMessage)ObjectUtils.DeserializeObject(br);
|
||||
else
|
||||
draft = null;
|
||||
|
||||
peer = (TLAbsPeer) ObjectUtils.DeserializeObject(br);
|
||||
top_message = br.ReadInt32();
|
||||
read_inbox_max_id = br.ReadInt32();
|
||||
read_outbox_max_id = br.ReadInt32();
|
||||
unread_count = br.ReadInt32();
|
||||
notify_settings = (TLAbsPeerNotifySettings) ObjectUtils.DeserializeObject(br);
|
||||
if ((flags & 1) != 0)
|
||||
pts = br.ReadInt32();
|
||||
else
|
||||
pts = null;
|
||||
|
||||
if ((flags & 2) != 0)
|
||||
draft = (TLAbsDraftMessage) ObjectUtils.DeserializeObject(br);
|
||||
else
|
||||
draft = null;
|
||||
}
|
||||
|
||||
public override void SerializeBody(BinaryWriter bw)
|
||||
{
|
||||
bw.Write(Constructor);
|
||||
bw.Write(Constructor);
|
||||
ComputeFlags();
|
||||
bw.Write(flags);
|
||||
ObjectUtils.SerializeObject(peer,bw);
|
||||
bw.Write(top_message);
|
||||
bw.Write(read_inbox_max_id);
|
||||
bw.Write(read_outbox_max_id);
|
||||
bw.Write(unread_count);
|
||||
ObjectUtils.SerializeObject(notify_settings,bw);
|
||||
if ((flags & 1) != 0)
|
||||
bw.Write(pts.Value);
|
||||
if ((flags & 2) != 0)
|
||||
ObjectUtils.SerializeObject(draft,bw);
|
||||
|
||||
bw.Write(flags);
|
||||
ObjectUtils.SerializeObject(peer, bw);
|
||||
bw.Write(top_message);
|
||||
bw.Write(read_inbox_max_id);
|
||||
bw.Write(read_outbox_max_id);
|
||||
bw.Write(unread_count);
|
||||
ObjectUtils.SerializeObject(notify_settings, bw);
|
||||
if ((flags & 1) != 0)
|
||||
bw.Write(pts.Value);
|
||||
if ((flags & 2) != 0)
|
||||
ObjectUtils.SerializeObject(draft, bw);
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
Loading…
Add table
Add a link
Reference in a new issue