mirror of
https://github.com/sochix/TLSharp.git
synced 2026-04-05 14:37:04 +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,38 +18,38 @@ namespace TeleSharp.TL.Updates
|
|||
}
|
||||
}
|
||||
|
||||
public int flags { get; set; }
|
||||
public bool final { get; set; }
|
||||
public int pts { get; set; }
|
||||
public int? timeout { get; set; }
|
||||
public TLVector<TLAbsMessage> new_messages { get; set; }
|
||||
public TLVector<TLAbsUpdate> other_updates { get; set; }
|
||||
public TLVector<TLAbsChat> chats { get; set; }
|
||||
public TLVector<TLAbsUser> users { get; set; }
|
||||
public int Flags { get; set; }
|
||||
public bool Final { get; set; }
|
||||
public int Pts { get; set; }
|
||||
public int? Timeout { get; set; }
|
||||
public TLVector<TLAbsMessage> NewMessages { get; set; }
|
||||
public TLVector<TLAbsUpdate> OtherUpdates { get; set; }
|
||||
public TLVector<TLAbsChat> Chats { get; set; }
|
||||
public TLVector<TLAbsUser> Users { get; set; }
|
||||
|
||||
|
||||
public void ComputeFlags()
|
||||
{
|
||||
flags = 0;
|
||||
flags = final ? (flags | 1) : (flags & ~1);
|
||||
flags = timeout != null ? (flags | 2) : (flags & ~2);
|
||||
Flags = 0;
|
||||
Flags = Final ? (Flags | 1) : (Flags & ~1);
|
||||
Flags = Timeout != null ? (Flags | 2) : (Flags & ~2);
|
||||
|
||||
}
|
||||
|
||||
public override void DeserializeBody(BinaryReader br)
|
||||
{
|
||||
flags = br.ReadInt32();
|
||||
final = (flags & 1) != 0;
|
||||
pts = br.ReadInt32();
|
||||
if ((flags & 2) != 0)
|
||||
timeout = br.ReadInt32();
|
||||
Flags = br.ReadInt32();
|
||||
Final = (Flags & 1) != 0;
|
||||
Pts = br.ReadInt32();
|
||||
if ((Flags & 2) != 0)
|
||||
Timeout = br.ReadInt32();
|
||||
else
|
||||
timeout = null;
|
||||
Timeout = null;
|
||||
|
||||
new_messages = (TLVector<TLAbsMessage>)ObjectUtils.DeserializeVector<TLAbsMessage>(br);
|
||||
other_updates = (TLVector<TLAbsUpdate>)ObjectUtils.DeserializeVector<TLAbsUpdate>(br);
|
||||
chats = (TLVector<TLAbsChat>)ObjectUtils.DeserializeVector<TLAbsChat>(br);
|
||||
users = (TLVector<TLAbsUser>)ObjectUtils.DeserializeVector<TLAbsUser>(br);
|
||||
NewMessages = (TLVector<TLAbsMessage>)ObjectUtils.DeserializeVector<TLAbsMessage>(br);
|
||||
OtherUpdates = (TLVector<TLAbsUpdate>)ObjectUtils.DeserializeVector<TLAbsUpdate>(br);
|
||||
Chats = (TLVector<TLAbsChat>)ObjectUtils.DeserializeVector<TLAbsChat>(br);
|
||||
Users = (TLVector<TLAbsUser>)ObjectUtils.DeserializeVector<TLAbsUser>(br);
|
||||
|
||||
}
|
||||
|
||||
|
|
@ -57,15 +57,15 @@ namespace TeleSharp.TL.Updates
|
|||
{
|
||||
bw.Write(Constructor);
|
||||
ComputeFlags();
|
||||
bw.Write(flags);
|
||||
bw.Write(Flags);
|
||||
|
||||
bw.Write(pts);
|
||||
if ((flags & 2) != 0)
|
||||
bw.Write(timeout.Value);
|
||||
ObjectUtils.SerializeObject(new_messages, bw);
|
||||
ObjectUtils.SerializeObject(other_updates, bw);
|
||||
ObjectUtils.SerializeObject(chats, bw);
|
||||
ObjectUtils.SerializeObject(users, bw);
|
||||
bw.Write(Pts);
|
||||
if ((Flags & 2) != 0)
|
||||
bw.Write(Timeout.Value);
|
||||
ObjectUtils.SerializeObject(NewMessages, bw);
|
||||
ObjectUtils.SerializeObject(OtherUpdates, bw);
|
||||
ObjectUtils.SerializeObject(Chats, bw);
|
||||
ObjectUtils.SerializeObject(Users, bw);
|
||||
|
||||
}
|
||||
}
|
||||
|
|
|
|||
|
|
@ -18,29 +18,29 @@ namespace TeleSharp.TL.Updates
|
|||
}
|
||||
}
|
||||
|
||||
public int flags { get; set; }
|
||||
public bool final { get; set; }
|
||||
public int pts { get; set; }
|
||||
public int? timeout { get; set; }
|
||||
public int Flags { get; set; }
|
||||
public bool Final { get; set; }
|
||||
public int Pts { get; set; }
|
||||
public int? Timeout { get; set; }
|
||||
|
||||
|
||||
public void ComputeFlags()
|
||||
{
|
||||
flags = 0;
|
||||
flags = final ? (flags | 1) : (flags & ~1);
|
||||
flags = timeout != null ? (flags | 2) : (flags & ~2);
|
||||
Flags = 0;
|
||||
Flags = Final ? (Flags | 1) : (Flags & ~1);
|
||||
Flags = Timeout != null ? (Flags | 2) : (Flags & ~2);
|
||||
|
||||
}
|
||||
|
||||
public override void DeserializeBody(BinaryReader br)
|
||||
{
|
||||
flags = br.ReadInt32();
|
||||
final = (flags & 1) != 0;
|
||||
pts = br.ReadInt32();
|
||||
if ((flags & 2) != 0)
|
||||
timeout = br.ReadInt32();
|
||||
Flags = br.ReadInt32();
|
||||
Final = (Flags & 1) != 0;
|
||||
Pts = br.ReadInt32();
|
||||
if ((Flags & 2) != 0)
|
||||
Timeout = br.ReadInt32();
|
||||
else
|
||||
timeout = null;
|
||||
Timeout = null;
|
||||
|
||||
|
||||
}
|
||||
|
|
@ -49,11 +49,11 @@ namespace TeleSharp.TL.Updates
|
|||
{
|
||||
bw.Write(Constructor);
|
||||
ComputeFlags();
|
||||
bw.Write(flags);
|
||||
bw.Write(Flags);
|
||||
|
||||
bw.Write(pts);
|
||||
if ((flags & 2) != 0)
|
||||
bw.Write(timeout.Value);
|
||||
bw.Write(Pts);
|
||||
if ((Flags & 2) != 0)
|
||||
bw.Write(Timeout.Value);
|
||||
|
||||
}
|
||||
}
|
||||
|
|
|
|||
|
|
@ -18,44 +18,44 @@ namespace TeleSharp.TL.Updates
|
|||
}
|
||||
}
|
||||
|
||||
public int flags { get; set; }
|
||||
public bool final { get; set; }
|
||||
public int pts { get; set; }
|
||||
public int? timeout { 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 TLVector<TLAbsMessage> messages { get; set; }
|
||||
public TLVector<TLAbsChat> chats { get; set; }
|
||||
public TLVector<TLAbsUser> users { get; set; }
|
||||
public int Flags { get; set; }
|
||||
public bool Final { get; set; }
|
||||
public int Pts { get; set; }
|
||||
public int? Timeout { get; set; }
|
||||
public int TopMessage { get; set; }
|
||||
public int ReadInboxMaxId { get; set; }
|
||||
public int ReadOutboxMaxId { get; set; }
|
||||
public int UnreadCount { get; set; }
|
||||
public TLVector<TLAbsMessage> Messages { get; set; }
|
||||
public TLVector<TLAbsChat> Chats { get; set; }
|
||||
public TLVector<TLAbsUser> Users { get; set; }
|
||||
|
||||
|
||||
public void ComputeFlags()
|
||||
{
|
||||
flags = 0;
|
||||
flags = final ? (flags | 1) : (flags & ~1);
|
||||
flags = timeout != null ? (flags | 2) : (flags & ~2);
|
||||
Flags = 0;
|
||||
Flags = Final ? (Flags | 1) : (Flags & ~1);
|
||||
Flags = Timeout != null ? (Flags | 2) : (Flags & ~2);
|
||||
|
||||
}
|
||||
|
||||
public override void DeserializeBody(BinaryReader br)
|
||||
{
|
||||
flags = br.ReadInt32();
|
||||
final = (flags & 1) != 0;
|
||||
pts = br.ReadInt32();
|
||||
if ((flags & 2) != 0)
|
||||
timeout = br.ReadInt32();
|
||||
Flags = br.ReadInt32();
|
||||
Final = (Flags & 1) != 0;
|
||||
Pts = br.ReadInt32();
|
||||
if ((Flags & 2) != 0)
|
||||
Timeout = br.ReadInt32();
|
||||
else
|
||||
timeout = null;
|
||||
Timeout = null;
|
||||
|
||||
top_message = br.ReadInt32();
|
||||
read_inbox_max_id = br.ReadInt32();
|
||||
read_outbox_max_id = br.ReadInt32();
|
||||
unread_count = br.ReadInt32();
|
||||
messages = (TLVector<TLAbsMessage>)ObjectUtils.DeserializeVector<TLAbsMessage>(br);
|
||||
chats = (TLVector<TLAbsChat>)ObjectUtils.DeserializeVector<TLAbsChat>(br);
|
||||
users = (TLVector<TLAbsUser>)ObjectUtils.DeserializeVector<TLAbsUser>(br);
|
||||
TopMessage = br.ReadInt32();
|
||||
ReadInboxMaxId = br.ReadInt32();
|
||||
ReadOutboxMaxId = br.ReadInt32();
|
||||
UnreadCount = br.ReadInt32();
|
||||
Messages = (TLVector<TLAbsMessage>)ObjectUtils.DeserializeVector<TLAbsMessage>(br);
|
||||
Chats = (TLVector<TLAbsChat>)ObjectUtils.DeserializeVector<TLAbsChat>(br);
|
||||
Users = (TLVector<TLAbsUser>)ObjectUtils.DeserializeVector<TLAbsUser>(br);
|
||||
|
||||
}
|
||||
|
||||
|
|
@ -63,18 +63,18 @@ namespace TeleSharp.TL.Updates
|
|||
{
|
||||
bw.Write(Constructor);
|
||||
ComputeFlags();
|
||||
bw.Write(flags);
|
||||
bw.Write(Flags);
|
||||
|
||||
bw.Write(pts);
|
||||
if ((flags & 2) != 0)
|
||||
bw.Write(timeout.Value);
|
||||
bw.Write(top_message);
|
||||
bw.Write(read_inbox_max_id);
|
||||
bw.Write(read_outbox_max_id);
|
||||
bw.Write(unread_count);
|
||||
ObjectUtils.SerializeObject(messages, bw);
|
||||
ObjectUtils.SerializeObject(chats, bw);
|
||||
ObjectUtils.SerializeObject(users, bw);
|
||||
bw.Write(Pts);
|
||||
if ((Flags & 2) != 0)
|
||||
bw.Write(Timeout.Value);
|
||||
bw.Write(TopMessage);
|
||||
bw.Write(ReadInboxMaxId);
|
||||
bw.Write(ReadOutboxMaxId);
|
||||
bw.Write(UnreadCount);
|
||||
ObjectUtils.SerializeObject(Messages, bw);
|
||||
ObjectUtils.SerializeObject(Chats, bw);
|
||||
ObjectUtils.SerializeObject(Users, bw);
|
||||
|
||||
}
|
||||
}
|
||||
|
|
|
|||
|
|
@ -18,12 +18,12 @@ namespace TeleSharp.TL.Updates
|
|||
}
|
||||
}
|
||||
|
||||
public TLVector<TLAbsMessage> new_messages { get; set; }
|
||||
public TLVector<TLAbsEncryptedMessage> new_encrypted_messages { get; set; }
|
||||
public TLVector<TLAbsUpdate> other_updates { get; set; }
|
||||
public TLVector<TLAbsChat> chats { get; set; }
|
||||
public TLVector<TLAbsUser> users { get; set; }
|
||||
public Updates.TLState state { get; set; }
|
||||
public TLVector<TLAbsMessage> NewMessages { get; set; }
|
||||
public TLVector<TLAbsEncryptedMessage> NewEncryptedMessages { get; set; }
|
||||
public TLVector<TLAbsUpdate> OtherUpdates { get; set; }
|
||||
public TLVector<TLAbsChat> Chats { get; set; }
|
||||
public TLVector<TLAbsUser> Users { get; set; }
|
||||
public Updates.TLState State { get; set; }
|
||||
|
||||
|
||||
public void ComputeFlags()
|
||||
|
|
@ -33,24 +33,24 @@ namespace TeleSharp.TL.Updates
|
|||
|
||||
public override void DeserializeBody(BinaryReader br)
|
||||
{
|
||||
new_messages = (TLVector<TLAbsMessage>)ObjectUtils.DeserializeVector<TLAbsMessage>(br);
|
||||
new_encrypted_messages = (TLVector<TLAbsEncryptedMessage>)ObjectUtils.DeserializeVector<TLAbsEncryptedMessage>(br);
|
||||
other_updates = (TLVector<TLAbsUpdate>)ObjectUtils.DeserializeVector<TLAbsUpdate>(br);
|
||||
chats = (TLVector<TLAbsChat>)ObjectUtils.DeserializeVector<TLAbsChat>(br);
|
||||
users = (TLVector<TLAbsUser>)ObjectUtils.DeserializeVector<TLAbsUser>(br);
|
||||
state = (Updates.TLState)ObjectUtils.DeserializeObject(br);
|
||||
NewMessages = (TLVector<TLAbsMessage>)ObjectUtils.DeserializeVector<TLAbsMessage>(br);
|
||||
NewEncryptedMessages = (TLVector<TLAbsEncryptedMessage>)ObjectUtils.DeserializeVector<TLAbsEncryptedMessage>(br);
|
||||
OtherUpdates = (TLVector<TLAbsUpdate>)ObjectUtils.DeserializeVector<TLAbsUpdate>(br);
|
||||
Chats = (TLVector<TLAbsChat>)ObjectUtils.DeserializeVector<TLAbsChat>(br);
|
||||
Users = (TLVector<TLAbsUser>)ObjectUtils.DeserializeVector<TLAbsUser>(br);
|
||||
State = (Updates.TLState)ObjectUtils.DeserializeObject(br);
|
||||
|
||||
}
|
||||
|
||||
public override void SerializeBody(BinaryWriter bw)
|
||||
{
|
||||
bw.Write(Constructor);
|
||||
ObjectUtils.SerializeObject(new_messages, bw);
|
||||
ObjectUtils.SerializeObject(new_encrypted_messages, bw);
|
||||
ObjectUtils.SerializeObject(other_updates, bw);
|
||||
ObjectUtils.SerializeObject(chats, bw);
|
||||
ObjectUtils.SerializeObject(users, bw);
|
||||
ObjectUtils.SerializeObject(state, bw);
|
||||
ObjectUtils.SerializeObject(NewMessages, bw);
|
||||
ObjectUtils.SerializeObject(NewEncryptedMessages, bw);
|
||||
ObjectUtils.SerializeObject(OtherUpdates, bw);
|
||||
ObjectUtils.SerializeObject(Chats, bw);
|
||||
ObjectUtils.SerializeObject(Users, bw);
|
||||
ObjectUtils.SerializeObject(State, bw);
|
||||
|
||||
}
|
||||
}
|
||||
|
|
|
|||
|
|
@ -18,8 +18,8 @@ namespace TeleSharp.TL.Updates
|
|||
}
|
||||
}
|
||||
|
||||
public int date { get; set; }
|
||||
public int seq { get; set; }
|
||||
public int Date { get; set; }
|
||||
public int Seq { get; set; }
|
||||
|
||||
|
||||
public void ComputeFlags()
|
||||
|
|
@ -29,16 +29,16 @@ namespace TeleSharp.TL.Updates
|
|||
|
||||
public override void DeserializeBody(BinaryReader br)
|
||||
{
|
||||
date = br.ReadInt32();
|
||||
seq = br.ReadInt32();
|
||||
Date = br.ReadInt32();
|
||||
Seq = br.ReadInt32();
|
||||
|
||||
}
|
||||
|
||||
public override void SerializeBody(BinaryWriter bw)
|
||||
{
|
||||
bw.Write(Constructor);
|
||||
bw.Write(date);
|
||||
bw.Write(seq);
|
||||
bw.Write(Date);
|
||||
bw.Write(Seq);
|
||||
|
||||
}
|
||||
}
|
||||
|
|
|
|||
|
|
@ -18,12 +18,12 @@ namespace TeleSharp.TL.Updates
|
|||
}
|
||||
}
|
||||
|
||||
public TLVector<TLAbsMessage> new_messages { get; set; }
|
||||
public TLVector<TLAbsEncryptedMessage> new_encrypted_messages { get; set; }
|
||||
public TLVector<TLAbsUpdate> other_updates { get; set; }
|
||||
public TLVector<TLAbsChat> chats { get; set; }
|
||||
public TLVector<TLAbsUser> users { get; set; }
|
||||
public Updates.TLState intermediate_state { get; set; }
|
||||
public TLVector<TLAbsMessage> NewMessages { get; set; }
|
||||
public TLVector<TLAbsEncryptedMessage> NewEncryptedMessages { get; set; }
|
||||
public TLVector<TLAbsUpdate> OtherUpdates { get; set; }
|
||||
public TLVector<TLAbsChat> Chats { get; set; }
|
||||
public TLVector<TLAbsUser> Users { get; set; }
|
||||
public Updates.TLState IntermediateState { get; set; }
|
||||
|
||||
|
||||
public void ComputeFlags()
|
||||
|
|
@ -33,24 +33,24 @@ namespace TeleSharp.TL.Updates
|
|||
|
||||
public override void DeserializeBody(BinaryReader br)
|
||||
{
|
||||
new_messages = (TLVector<TLAbsMessage>)ObjectUtils.DeserializeVector<TLAbsMessage>(br);
|
||||
new_encrypted_messages = (TLVector<TLAbsEncryptedMessage>)ObjectUtils.DeserializeVector<TLAbsEncryptedMessage>(br);
|
||||
other_updates = (TLVector<TLAbsUpdate>)ObjectUtils.DeserializeVector<TLAbsUpdate>(br);
|
||||
chats = (TLVector<TLAbsChat>)ObjectUtils.DeserializeVector<TLAbsChat>(br);
|
||||
users = (TLVector<TLAbsUser>)ObjectUtils.DeserializeVector<TLAbsUser>(br);
|
||||
intermediate_state = (Updates.TLState)ObjectUtils.DeserializeObject(br);
|
||||
NewMessages = (TLVector<TLAbsMessage>)ObjectUtils.DeserializeVector<TLAbsMessage>(br);
|
||||
NewEncryptedMessages = (TLVector<TLAbsEncryptedMessage>)ObjectUtils.DeserializeVector<TLAbsEncryptedMessage>(br);
|
||||
OtherUpdates = (TLVector<TLAbsUpdate>)ObjectUtils.DeserializeVector<TLAbsUpdate>(br);
|
||||
Chats = (TLVector<TLAbsChat>)ObjectUtils.DeserializeVector<TLAbsChat>(br);
|
||||
Users = (TLVector<TLAbsUser>)ObjectUtils.DeserializeVector<TLAbsUser>(br);
|
||||
IntermediateState = (Updates.TLState)ObjectUtils.DeserializeObject(br);
|
||||
|
||||
}
|
||||
|
||||
public override void SerializeBody(BinaryWriter bw)
|
||||
{
|
||||
bw.Write(Constructor);
|
||||
ObjectUtils.SerializeObject(new_messages, bw);
|
||||
ObjectUtils.SerializeObject(new_encrypted_messages, bw);
|
||||
ObjectUtils.SerializeObject(other_updates, bw);
|
||||
ObjectUtils.SerializeObject(chats, bw);
|
||||
ObjectUtils.SerializeObject(users, bw);
|
||||
ObjectUtils.SerializeObject(intermediate_state, bw);
|
||||
ObjectUtils.SerializeObject(NewMessages, bw);
|
||||
ObjectUtils.SerializeObject(NewEncryptedMessages, bw);
|
||||
ObjectUtils.SerializeObject(OtherUpdates, bw);
|
||||
ObjectUtils.SerializeObject(Chats, bw);
|
||||
ObjectUtils.SerializeObject(Users, bw);
|
||||
ObjectUtils.SerializeObject(IntermediateState, bw);
|
||||
|
||||
}
|
||||
}
|
||||
|
|
|
|||
|
|
@ -18,7 +18,7 @@ namespace TeleSharp.TL.Updates
|
|||
}
|
||||
}
|
||||
|
||||
public int pts { get; set; }
|
||||
public int Pts { get; set; }
|
||||
|
||||
|
||||
public void ComputeFlags()
|
||||
|
|
@ -28,14 +28,14 @@ namespace TeleSharp.TL.Updates
|
|||
|
||||
public override void DeserializeBody(BinaryReader br)
|
||||
{
|
||||
pts = br.ReadInt32();
|
||||
Pts = br.ReadInt32();
|
||||
|
||||
}
|
||||
|
||||
public override void SerializeBody(BinaryWriter bw)
|
||||
{
|
||||
bw.Write(Constructor);
|
||||
bw.Write(pts);
|
||||
bw.Write(Pts);
|
||||
|
||||
}
|
||||
}
|
||||
|
|
|
|||
|
|
@ -18,30 +18,30 @@ namespace TeleSharp.TL.Updates
|
|||
}
|
||||
}
|
||||
|
||||
public int flags { get; set; }
|
||||
public bool force { get; set; }
|
||||
public TLAbsInputChannel channel { get; set; }
|
||||
public TLAbsChannelMessagesFilter filter { get; set; }
|
||||
public int pts { get; set; }
|
||||
public int limit { get; set; }
|
||||
public int Flags { get; set; }
|
||||
public bool Force { get; set; }
|
||||
public TLAbsInputChannel Channel { get; set; }
|
||||
public TLAbsChannelMessagesFilter Filter { get; set; }
|
||||
public int Pts { get; set; }
|
||||
public int Limit { get; set; }
|
||||
public Updates.TLAbsChannelDifference Response { get; set; }
|
||||
|
||||
|
||||
public void ComputeFlags()
|
||||
{
|
||||
flags = 0;
|
||||
flags = force ? (flags | 1) : (flags & ~1);
|
||||
Flags = 0;
|
||||
Flags = Force ? (Flags | 1) : (Flags & ~1);
|
||||
|
||||
}
|
||||
|
||||
public override void DeserializeBody(BinaryReader br)
|
||||
{
|
||||
flags = br.ReadInt32();
|
||||
force = (flags & 1) != 0;
|
||||
channel = (TLAbsInputChannel)ObjectUtils.DeserializeObject(br);
|
||||
filter = (TLAbsChannelMessagesFilter)ObjectUtils.DeserializeObject(br);
|
||||
pts = br.ReadInt32();
|
||||
limit = br.ReadInt32();
|
||||
Flags = br.ReadInt32();
|
||||
Force = (Flags & 1) != 0;
|
||||
Channel = (TLAbsInputChannel)ObjectUtils.DeserializeObject(br);
|
||||
Filter = (TLAbsChannelMessagesFilter)ObjectUtils.DeserializeObject(br);
|
||||
Pts = br.ReadInt32();
|
||||
Limit = br.ReadInt32();
|
||||
|
||||
}
|
||||
|
||||
|
|
@ -49,15 +49,15 @@ namespace TeleSharp.TL.Updates
|
|||
{
|
||||
bw.Write(Constructor);
|
||||
ComputeFlags();
|
||||
bw.Write(flags);
|
||||
bw.Write(Flags);
|
||||
|
||||
ObjectUtils.SerializeObject(channel, bw);
|
||||
ObjectUtils.SerializeObject(filter, bw);
|
||||
bw.Write(pts);
|
||||
bw.Write(limit);
|
||||
ObjectUtils.SerializeObject(Channel, bw);
|
||||
ObjectUtils.SerializeObject(Filter, bw);
|
||||
bw.Write(Pts);
|
||||
bw.Write(Limit);
|
||||
|
||||
}
|
||||
public override void deserializeResponse(BinaryReader br)
|
||||
public override void DeserializeResponse(BinaryReader br)
|
||||
{
|
||||
Response = (Updates.TLAbsChannelDifference)ObjectUtils.DeserializeObject(br);
|
||||
|
||||
|
|
|
|||
|
|
@ -18,32 +18,32 @@ namespace TeleSharp.TL.Updates
|
|||
}
|
||||
}
|
||||
|
||||
public int flags { get; set; }
|
||||
public int pts { get; set; }
|
||||
public int? pts_total_limit { get; set; }
|
||||
public int date { get; set; }
|
||||
public int qts { get; set; }
|
||||
public int Flags { get; set; }
|
||||
public int Pts { get; set; }
|
||||
public int? PtsTotalLimit { get; set; }
|
||||
public int Date { get; set; }
|
||||
public int Qts { get; set; }
|
||||
public Updates.TLAbsDifference Response { get; set; }
|
||||
|
||||
|
||||
public void ComputeFlags()
|
||||
{
|
||||
flags = 0;
|
||||
flags = pts_total_limit != null ? (flags | 1) : (flags & ~1);
|
||||
Flags = 0;
|
||||
Flags = PtsTotalLimit != null ? (Flags | 1) : (Flags & ~1);
|
||||
|
||||
}
|
||||
|
||||
public override void DeserializeBody(BinaryReader br)
|
||||
{
|
||||
flags = br.ReadInt32();
|
||||
pts = br.ReadInt32();
|
||||
if ((flags & 1) != 0)
|
||||
pts_total_limit = br.ReadInt32();
|
||||
Flags = br.ReadInt32();
|
||||
Pts = br.ReadInt32();
|
||||
if ((Flags & 1) != 0)
|
||||
PtsTotalLimit = br.ReadInt32();
|
||||
else
|
||||
pts_total_limit = null;
|
||||
PtsTotalLimit = null;
|
||||
|
||||
date = br.ReadInt32();
|
||||
qts = br.ReadInt32();
|
||||
Date = br.ReadInt32();
|
||||
Qts = br.ReadInt32();
|
||||
|
||||
}
|
||||
|
||||
|
|
@ -51,15 +51,15 @@ namespace TeleSharp.TL.Updates
|
|||
{
|
||||
bw.Write(Constructor);
|
||||
ComputeFlags();
|
||||
bw.Write(flags);
|
||||
bw.Write(pts);
|
||||
if ((flags & 1) != 0)
|
||||
bw.Write(pts_total_limit.Value);
|
||||
bw.Write(date);
|
||||
bw.Write(qts);
|
||||
bw.Write(Flags);
|
||||
bw.Write(Pts);
|
||||
if ((Flags & 1) != 0)
|
||||
bw.Write(PtsTotalLimit.Value);
|
||||
bw.Write(Date);
|
||||
bw.Write(Qts);
|
||||
|
||||
}
|
||||
public override void deserializeResponse(BinaryReader br)
|
||||
public override void DeserializeResponse(BinaryReader br)
|
||||
{
|
||||
Response = (Updates.TLAbsDifference)ObjectUtils.DeserializeObject(br);
|
||||
|
||||
|
|
|
|||
|
|
@ -36,7 +36,7 @@ namespace TeleSharp.TL.Updates
|
|||
bw.Write(Constructor);
|
||||
|
||||
}
|
||||
public override void deserializeResponse(BinaryReader br)
|
||||
public override void DeserializeResponse(BinaryReader br)
|
||||
{
|
||||
Response = (Updates.TLState)ObjectUtils.DeserializeObject(br);
|
||||
|
||||
|
|
|
|||
|
|
@ -18,11 +18,11 @@ namespace TeleSharp.TL.Updates
|
|||
}
|
||||
}
|
||||
|
||||
public int pts { get; set; }
|
||||
public int qts { get; set; }
|
||||
public int date { get; set; }
|
||||
public int seq { get; set; }
|
||||
public int unread_count { get; set; }
|
||||
public int Pts { get; set; }
|
||||
public int Qts { get; set; }
|
||||
public int Date { get; set; }
|
||||
public int Seq { get; set; }
|
||||
public int UnreadCount { get; set; }
|
||||
|
||||
|
||||
public void ComputeFlags()
|
||||
|
|
@ -32,22 +32,22 @@ namespace TeleSharp.TL.Updates
|
|||
|
||||
public override void DeserializeBody(BinaryReader br)
|
||||
{
|
||||
pts = br.ReadInt32();
|
||||
qts = br.ReadInt32();
|
||||
date = br.ReadInt32();
|
||||
seq = br.ReadInt32();
|
||||
unread_count = br.ReadInt32();
|
||||
Pts = br.ReadInt32();
|
||||
Qts = br.ReadInt32();
|
||||
Date = br.ReadInt32();
|
||||
Seq = br.ReadInt32();
|
||||
UnreadCount = br.ReadInt32();
|
||||
|
||||
}
|
||||
|
||||
public override void SerializeBody(BinaryWriter bw)
|
||||
{
|
||||
bw.Write(Constructor);
|
||||
bw.Write(pts);
|
||||
bw.Write(qts);
|
||||
bw.Write(date);
|
||||
bw.Write(seq);
|
||||
bw.Write(unread_count);
|
||||
bw.Write(Pts);
|
||||
bw.Write(Qts);
|
||||
bw.Write(Date);
|
||||
bw.Write(Seq);
|
||||
bw.Write(UnreadCount);
|
||||
|
||||
}
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue