mirror of
https://github.com/wiz0u/WTelegramClient.git
synced 2026-04-06 15:04:25 +00:00
ToBytes TL.Serialization helper.
Warning: do not use for long-term storage because TL structures can change in future layers and may not be deserializable
This commit is contained in:
parent
9ec2f31f72
commit
d6fdcab440
4 changed files with 14 additions and 7 deletions
|
|
@ -181,11 +181,11 @@ public class MTProtoGenerator : IIncrementalGenerator
|
|||
break;
|
||||
case "System.Collections.Generic.Dictionary<long, TL.User>":
|
||||
readTL.AppendLine($"r.{member.Name} = reader.ReadTLDictionary<User>();");
|
||||
writeTl.AppendLine($"writer.WriteTLVector({member.Name}.Values.ToArray());");
|
||||
writeTl.AppendLine($"writer.WriteTLVector({member.Name}?.Values.ToArray());");
|
||||
break;
|
||||
case "System.Collections.Generic.Dictionary<long, TL.ChatBase>":
|
||||
readTL.AppendLine($"r.{member.Name} = reader.ReadTLDictionary<ChatBase>();");
|
||||
writeTl.AppendLine($"writer.WriteTLVector({member.Name}.Values.ToArray());");
|
||||
writeTl.AppendLine($"writer.WriteTLVector({member.Name}?.Values.ToArray());");
|
||||
break;
|
||||
case "object":
|
||||
readTL.AppendLine($"r.{member.Name} = reader.ReadTLObject();");
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue