コード例 #1
0
 public override void SerializeBody(BinaryWriter bw)
 {
     bw.Write(Constructor);
     bw.Write(QueryId);
     bw.Write(UserId);
     BytesUtil.Serialize(Payload, bw);
     ObjectUtils.SerializeObject(ShippingAddress, bw);
 }
コード例 #2
0
 public override void DeserializeBody(BinaryReader br)
 {
     Id = br.ReadInt64();
     Parts = br.ReadInt32();
     Md5Checksum = StringUtil.Deserialize(br);
     FileHash = BytesUtil.Deserialize(br);
     Secret = BytesUtil.Deserialize(br);
 }
コード例 #3
0
 public override void SerializeBody(BinaryWriter bw)
 {
     bw.Write(Constructor);
     bw.Write(Id);
     bw.Write(AccessHash);
     BytesUtil.Serialize(FileReference, bw);
     StringUtil.Serialize(ThumbSize, bw);
 }
コード例 #4
0
 public override void DeserializeBody(BinaryReader br)
 {
     Id      = br.ReadInt64();
     Ip      = StringUtil.Deserialize(br);
     Ipv6    = StringUtil.Deserialize(br);
     Port    = br.ReadInt32();
     PeerTag = BytesUtil.Deserialize(br);
 }
コード例 #5
0
 public override void SerializeBody(BinaryWriter bw)
 {
     bw.Write(Constructor);
     bw.Write(RandomId);
     bw.Write(ChatId);
     bw.Write(Date);
     BytesUtil.Serialize(Bytes, bw);
 }
コード例 #6
0
 public override void SerializeBody(BinaryWriter bw)
 {
     bw.Write(Constructor);
     ObjectUtils.SerializeObject(Type, bw);
     BytesUtil.Serialize(DataHash, bw);
     StringUtil.Serialize(Field, bw);
     StringUtil.Serialize(Text, bw);
 }
コード例 #7
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);
 }
コード例 #8
0
 public override void DeserializeBody(BinaryReader br)
 {
     Id            = br.ReadInt64();
     AccessHash    = br.ReadInt64();
     FileReference = BytesUtil.Deserialize(br);
     VolumeId      = br.ReadInt64();
     LocalId       = br.ReadInt32();
     Secret        = br.ReadInt64();
 }
コード例 #9
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);
 }
コード例 #10
0
 public override void SerializeBody(BinaryWriter bw)
 {
     bw.Write(Constructor);
     bw.Write(Id);
     bw.Write(Parts);
     StringUtil.Serialize(Md5Checksum, bw);
     BytesUtil.Serialize(FileHash, bw);
     BytesUtil.Serialize(Secret, bw);
 }
コード例 #11
0
ファイル: TLPhotoCachedSize.cs プロジェクト: telewear/TgSharp
 public override void DeserializeBody(BinaryReader br)
 {
     Type = StringUtil.Deserialize(br);
     // manual edit: FileLocation->TLFileLocationToBeDeprecated
     Location = (TLFileLocationToBeDeprecated)ObjectUtils.DeserializeObject(br);
     W        = br.ReadInt32();
     H        = br.ReadInt32();
     Bytes    = BytesUtil.Deserialize(br);
 }
コード例 #12
0
ファイル: TLPhotoCachedSize.cs プロジェクト: telewear/TgSharp
 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);
 }
コード例 #13
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);
 }
コード例 #14
0
 public override void SerializeBody(BinaryWriter bw)
 {
     bw.Write(Constructor);
     bw.Write(Id);
     bw.Write(AccessHash);
     BytesUtil.Serialize(FileReference, bw);
     bw.Write(VolumeId);
     bw.Write(LocalId);
     bw.Write(Secret);
 }
コード例 #15
0
ファイル: TLSecureFile.cs プロジェクト: telewear/TgSharp
 public override void DeserializeBody(BinaryReader br)
 {
     Id         = br.ReadInt64();
     AccessHash = br.ReadInt64();
     Size       = br.ReadInt32();
     DcId       = br.ReadInt32();
     Date       = br.ReadInt32();
     FileHash   = BytesUtil.Deserialize(br);
     Secret     = BytesUtil.Deserialize(br);
 }
コード例 #16
0
ファイル: TLPhoto.cs プロジェクト: telewear/TgSharp
 public override void SerializeBody(BinaryWriter bw)
 {
     bw.Write(Constructor);
     bw.Write(Flags);
     bw.Write(Id);
     bw.Write(AccessHash);
     BytesUtil.Serialize(FileReference, bw);
     bw.Write(Date);
     ObjectUtils.SerializeObject(Sizes, bw);
     bw.Write(DcId);
 }
コード例 #17
0
ファイル: TLPhoto.cs プロジェクト: telewear/TgSharp
 public override void DeserializeBody(BinaryReader br)
 {
     Flags         = br.ReadInt32();
     HasStickers   = (Flags & 1) != 0;
     Id            = br.ReadInt64();
     AccessHash    = br.ReadInt64();
     FileReference = BytesUtil.Deserialize(br);
     Date          = br.ReadInt32();
     Sizes         = (TLVector <TLAbsPhotoSize>)ObjectUtils.DeserializeVector <TLAbsPhotoSize>(br);
     DcId          = br.ReadInt32();
 }
コード例 #18
0
ファイル: TLSecureFile.cs プロジェクト: telewear/TgSharp
 public override void SerializeBody(BinaryWriter bw)
 {
     bw.Write(Constructor);
     bw.Write(Id);
     bw.Write(AccessHash);
     bw.Write(Size);
     bw.Write(DcId);
     bw.Write(Date);
     BytesUtil.Serialize(FileHash, bw);
     BytesUtil.Serialize(Secret, bw);
 }
コード例 #19
0
 public override void DeserializeBody(BinaryReader br)
 {
     Flags         = br.ReadInt32();
     Video         = (Flags & 32) != 0;
     Id            = br.ReadInt64();
     AccessHash    = br.ReadInt64();
     Date          = br.ReadInt32();
     AdminId       = br.ReadInt32();
     ParticipantId = br.ReadInt32();
     GB            = BytesUtil.Deserialize(br);
     Protocol      = (TLPhoneCallProtocol)ObjectUtils.DeserializeObject(br);
 }
コード例 #20
0
 public override void SerializeBody(BinaryWriter bw)
 {
     bw.Write(Constructor);
     bw.Write(Flags);
     bw.Write(Id);
     bw.Write(AccessHash);
     bw.Write(Date);
     bw.Write(AdminId);
     bw.Write(ParticipantId);
     BytesUtil.Serialize(GB, bw);
     ObjectUtils.SerializeObject(Protocol, bw);
 }
コード例 #21
0
ファイル: TLDcOption.cs プロジェクト: telewear/TgSharp
 public override void SerializeBody(BinaryWriter bw)
 {
     bw.Write(Constructor);
     bw.Write(Flags);
     bw.Write(Id);
     StringUtil.Serialize(IpAddress, bw);
     bw.Write(Port);
     if ((Flags & 1024) != 0)
     {
         BytesUtil.Serialize(Secret, bw);
     }
 }
コード例 #22
0
 public override void DeserializeBody(BinaryReader br)
 {
     Flags          = br.ReadInt32();
     P2pAllowed     = (Flags & 32) != 0;
     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);
     Connections    = (TLVector <TLPhoneConnection>)ObjectUtils.DeserializeVector <TLPhoneConnection>(br);
     StartDate      = br.ReadInt32();
 }
コード例 #23
0
 public override void SerializeBody(BinaryWriter bw)
 {
     bw.Write(Constructor);
     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);
     ObjectUtils.SerializeObject(ProviderData, bw);
     StringUtil.Serialize(StartParam, bw);
 }
コード例 #24
0
ファイル: TLDocument.cs プロジェクト: telewear/TgSharp
 public override void SerializeBody(BinaryWriter bw)
 {
     bw.Write(Constructor);
     bw.Write(Flags);
     bw.Write(Id);
     bw.Write(AccessHash);
     BytesUtil.Serialize(FileReference, bw);
     bw.Write(Date);
     StringUtil.Serialize(MimeType, bw);
     bw.Write(Size);
     if ((Flags & 1) != 0)
     {
         ObjectUtils.SerializeObject(Thumbs, bw);
     }
     bw.Write(DcId);
     ObjectUtils.SerializeObject(Attributes, bw);
 }
コード例 #25
0
 public override void SerializeBody(BinaryWriter bw)
 {
     bw.Write(Constructor);
     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);
     }
 }
コード例 #26
0
 public override void SerializeBody(BinaryWriter bw)
 {
     bw.Write(Constructor);
     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);
 }
コード例 #27
0
 public override void SerializeBody(BinaryWriter bw)
 {
     bw.Write(Constructor);
     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);
     }
 }
コード例 #28
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);
            ProviderData = (TLDataJSON)ObjectUtils.DeserializeObject(br);
            StartParam   = StringUtil.Deserialize(br);
        }
コード例 #29
0
ファイル: TLDcOption.cs プロジェクト: telewear/TgSharp
 public override void DeserializeBody(BinaryReader br)
 {
     Flags     = br.ReadInt32();
     Ipv6      = (Flags & 1) != 0;
     MediaOnly = (Flags & 2) != 0;
     TcpoOnly  = (Flags & 4) != 0;
     Cdn       = (Flags & 8) != 0;
     Static    = (Flags & 16) != 0;
     Id        = br.ReadInt32();
     IpAddress = StringUtil.Deserialize(br);
     Port      = br.ReadInt32();
     if ((Flags & 1024) != 0)
     {
         Secret = BytesUtil.Deserialize(br);
     }
     else
     {
         Secret = null;
     }
 }
コード例 #30
0
ファイル: TLDocument.cs プロジェクト: telewear/TgSharp
        public override void DeserializeBody(BinaryReader br)
        {
            Flags         = br.ReadInt32();
            Id            = br.ReadInt64();
            AccessHash    = br.ReadInt64();
            FileReference = BytesUtil.Deserialize(br);
            Date          = br.ReadInt32();
            MimeType      = StringUtil.Deserialize(br);
            Size          = br.ReadInt32();
            if ((Flags & 1) != 0)
            {
                Thumbs = (TLVector <TLAbsPhotoSize>)ObjectUtils.DeserializeVector <TLAbsPhotoSize>(br);
            }
            else
            {
                Thumbs = null;
            }

            DcId       = br.ReadInt32();
            Attributes = (TLVector <TLAbsDocumentAttribute>)ObjectUtils.DeserializeVector <TLAbsDocumentAttribute>(br);
        }