Пример #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
 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
 public static void Serialize(string src, BinaryWriter writer)
 {
     BytesUtil.Serialize(Encoding.UTF8.GetBytes(src), writer);
 }