示例#1
0
 public override void SerializeBody(BinaryWriter bw)
 {
     bw.Write(Constructor);
     bw.Write(RandomId);
     bw.Write(ChatId);
     bw.Write(Date);
     BytesUtil.Serialize(Bytes, bw);
 }
示例#2
0
 public override void DeserializeBody(BinaryReader br)
 {
     RandomId = br.ReadInt64();
     ChatId   = br.ReadInt32();
     Date     = br.ReadInt32();
     Bytes    = BytesUtil.Deserialize(br);
     File     = (TLAbsEncryptedFile)ObjectUtils.DeserializeObject(br);
 }
示例#3
0
 public override void SerializeBody(BinaryWriter bw)
 {
     bw.Write(Constructor);
     StringUtil.Serialize(Type, bw);
     ObjectUtils.SerializeObject(Location, bw);
     bw.Write(W);
     bw.Write(H);
     BytesUtil.Serialize(Bytes, bw);
 }
示例#4
0
 public override void SerializeBody(BinaryWriter bw)
 {
     bw.Write(Constructor);
     bw.Write(Id);
     StringUtil.Serialize(Ip, bw);
     StringUtil.Serialize(Ipv6, bw);
     bw.Write(Port);
     BytesUtil.Serialize(PeerTag, bw);
 }
示例#5
0
 public override void DeserializeBody(BinaryReader br)
 {
     Id            = br.ReadInt32();
     AccessHash    = br.ReadInt64();
     Date          = br.ReadInt32();
     AdminId       = br.ReadInt32();
     ParticipantId = br.ReadInt32();
     GA            = BytesUtil.Deserialize(br);
 }
示例#6
0
 public override void SerializeBody(BinaryWriter bw)
 {
     bw.Write(Constructor);
     bw.Write(Id);
     bw.Write(AccessHash);
     bw.Write(Date);
     bw.Write(AdminId);
     bw.Write(ParticipantId);
     BytesUtil.Serialize(GA, bw);
 }
示例#7
0
 public override void DeserializeBody(BinaryReader br)
 {
     Id            = br.ReadInt64();
     AccessHash    = br.ReadInt64();
     Date          = br.ReadInt32();
     AdminId       = br.ReadInt32();
     ParticipantId = br.ReadInt32();
     GAHash        = BytesUtil.Deserialize(br);
     Protocol      = (TLPhoneCallProtocol)ObjectUtils.DeserializeObject(br);
 }
示例#8
0
 public override void DeserializeBody(BinaryReader br)
 {
     Id                     = br.ReadInt64();
     AccessHash             = br.ReadInt64();
     Date                   = br.ReadInt32();
     AdminId                = br.ReadInt32();
     ParticipantId          = br.ReadInt32();
     GAOrB                  = BytesUtil.Deserialize(br);
     KeyFingerprint         = br.ReadInt64();
     Protocol               = (TLPhoneCallProtocol)ObjectUtils.DeserializeObject(br);
     Connection             = (TLPhoneConnection)ObjectUtils.DeserializeObject(br);
     AlternativeConnections = (TLVector <TLPhoneConnection>)ObjectUtils.DeserializeVector <TLPhoneConnection>(br);
     StartDate              = br.ReadInt32();
 }
示例#9
0
 public override void SerializeBody(BinaryWriter bw)
 {
     bw.Write(Constructor);
     bw.Write(Id);
     bw.Write(AccessHash);
     bw.Write(Date);
     bw.Write(AdminId);
     bw.Write(ParticipantId);
     BytesUtil.Serialize(GAOrB, bw);
     bw.Write(KeyFingerprint);
     ObjectUtils.SerializeObject(Protocol, bw);
     ObjectUtils.SerializeObject(Connection, bw);
     ObjectUtils.SerializeObject(AlternativeConnections, bw);
     bw.Write(StartDate);
 }
示例#10
0
 public override void SerializeBody(BinaryWriter bw)
 {
     bw.Write(Constructor);
     ComputeFlags();
     bw.Write(Flags);
     StringUtil.Serialize(Title, bw);
     StringUtil.Serialize(Description, bw);
     if ((Flags & 1) != 0)
     {
         ObjectUtils.SerializeObject(Photo, bw);
     }
     ObjectUtils.SerializeObject(Invoice, bw);
     BytesUtil.Serialize(Payload, bw);
     StringUtil.Serialize(Provider, bw);
     StringUtil.Serialize(StartParam, bw);
 }
示例#11
0
 public override void SerializeBody(BinaryWriter bw)
 {
     bw.Write(Constructor);
     ComputeFlags();
     bw.Write(Flags);
     StringUtil.Serialize(Currency, bw);
     bw.Write(TotalAmount);
     BytesUtil.Serialize(Payload, bw);
     if ((Flags & 1) != 0)
     {
         ObjectUtils.SerializeObject(Info, bw);
     }
     if ((Flags & 2) != 0)
     {
         StringUtil.Serialize(ShippingOptionId, bw);
     }
     ObjectUtils.SerializeObject(Charge, bw);
 }
示例#12
0
 public override void SerializeBody(BinaryWriter bw)
 {
     bw.Write(Constructor);
     ComputeFlags();
     bw.Write(Flags);
     bw.Write(QueryId);
     bw.Write(UserId);
     ObjectUtils.SerializeObject(MsgId, bw);
     bw.Write(ChatInstance);
     if ((Flags & 1) != 0)
     {
         BytesUtil.Serialize(Data, bw);
     }
     if ((Flags & 2) != 0)
     {
         StringUtil.Serialize(GameShortName, bw);
     }
 }
示例#13
0
        public override void DeserializeBody(BinaryReader br)
        {
            Flags       = br.ReadInt32();
            Title       = StringUtil.Deserialize(br);
            Description = StringUtil.Deserialize(br);
            if ((Flags & 1) != 0)
            {
                Photo = (TLInputWebDocument)ObjectUtils.DeserializeObject(br);
            }
            else
            {
                Photo = null;
            }

            Invoice    = (TLInvoice)ObjectUtils.DeserializeObject(br);
            Payload    = BytesUtil.Deserialize(br);
            Provider   = StringUtil.Deserialize(br);
            StartParam = StringUtil.Deserialize(br);
        }
示例#14
0
        public override void SerializeBody(BinaryWriter bw)
        {
            bw.Write(Constructor);
            ComputeFlags();
            bw.Write(Flags);

            bw.Write(Duration);
            if ((Flags & 1) != 0)
            {
                StringUtil.Serialize(Title, bw);
            }
            if ((Flags & 2) != 0)
            {
                StringUtil.Serialize(Performer, bw);
            }
            if ((Flags & 4) != 0)
            {
                BytesUtil.Serialize(Waveform, bw);
            }
        }
示例#15
0
 public override void DeserializeBody(BinaryReader br)
 {
     Text = StringUtil.Deserialize(br);
     Data = BytesUtil.Deserialize(br);
 }
示例#16
0
 public override void DeserializeBody(BinaryReader br)
 {
     Id          = StringUtil.Deserialize(br);
     TmpPassword = BytesUtil.Deserialize(br);
 }
示例#17
0
 public override void SerializeBody(BinaryWriter bw)
 {
     bw.Write(Constructor);
     StringUtil.Serialize(Id, bw);
     BytesUtil.Serialize(TmpPassword, bw);
 }
示例#18
0
文件: TLUtils.cs 项目: xclud/TLSchema
 public static string Deserialize(BinaryReader reader)
 {
     byte[] data = BytesUtil.Deserialize(reader);
     return(Encoding.UTF8.GetString(data, 0, data.Length));
 }
示例#19
0
 public override void SerializeBody(BinaryWriter bw)
 {
     bw.Write(Constructor);
     StringUtil.Serialize(Text, bw);
     BytesUtil.Serialize(Data, bw);
 }
示例#20
0
文件: TLUtils.cs 项目: xclud/TLSchema
 public static void Serialize(string src, BinaryWriter writer)
 {
     BytesUtil.Serialize(Encoding.UTF8.GetBytes(src), writer);
 }