Exemplo n.º 1
0
 public override void Write(TLBinaryWriter to)
 {
     to.WriteInt32(DCId);
     to.WriteInt64(VolumeId);
     to.WriteInt32(LocalId);
     to.WriteInt64(Secret);
 }
Exemplo n.º 2
0
 public override void Write(TLBinaryWriter to)
 {
     to.WriteInt32((Int32)Flags);
     to.WriteInt64(Id);
     to.WriteInt64(AccessHash);
     to.WriteInt32(Date);
     to.WriteObject(Sizes);
 }
Exemplo n.º 3
0
 public override void Write(TLBinaryWriter to)
 {
     to.WriteInt64(Id);
     to.WriteInt64(AccessHash);
     to.WriteInt32(Size);
     to.WriteInt32(DCId);
     to.WriteInt32(KeyFingerprint);
 }
Exemplo n.º 4
0
 public override void Write(TLBinaryWriter to)
 {
     to.WriteString(Url ?? string.Empty);
     to.WriteInt64(WebPageId);
     to.WriteInt64(AuthorPhotoId);
     to.WriteString(Author ?? string.Empty);
     to.WriteInt32(Date);
     to.WriteObject(Blocks);
     to.WriteObject(Caption);
 }
Exemplo n.º 5
0
 public override void Write(TLBinaryWriter to)
 {
     to.WriteInt32(Id);
     to.WriteInt64(AccessHash);
     to.WriteInt32(Date);
     to.WriteInt32(AdminId);
     to.WriteInt32(ParticipantId);
     to.WriteByteArray(GAOrB);
     to.WriteInt64(KeyFingerprint);
 }
Exemplo n.º 6
0
 public override void Write(TLBinaryWriter to)
 {
     to.WriteInt32((Int32)Flags);
     to.WriteInt64(Id);
     to.WriteInt64(AccessHash);
     to.WriteString(Title ?? string.Empty);
     to.WriteString(ShortName ?? string.Empty);
     to.WriteInt32(Count);
     to.WriteInt32(Hash);
 }
Exemplo n.º 7
0
 public override void Write(TLBinaryWriter to)
 {
     to.WriteInt64(Id);
     to.WriteInt64(AccessHash);
     to.WriteInt32(Date);
     to.WriteInt32(AdminId);
     to.WriteInt32(ParticipantId);
     to.WriteByteArray(GB);
     to.WriteObject(Protocol);
 }
Exemplo n.º 8
0
 public override void Write(TLBinaryWriter to)
 {
     to.WriteInt64(Id);
     to.WriteInt64(AccessHash);
     to.WriteInt32(Date);
     to.WriteString(MimeType ?? string.Empty);
     to.WriteInt32(Size);
     to.WriteObject(Thumb);
     to.WriteInt32(DCId);
     to.WriteInt32(Version);
     to.WriteObject(Attributes);
 }
Exemplo n.º 9
0
 public override void Write(TLBinaryWriter to)
 {
     to.WriteInt64(Id);
     to.WriteInt64(AccessHash);
     to.WriteInt32(Date);
     to.WriteInt32(AdminId);
     to.WriteInt32(ParticipantId);
     to.WriteByteArray(GAOrB);
     to.WriteInt64(KeyFingerprint);
     to.WriteObject(Protocol);
     to.WriteObject(Connection);
     to.WriteObject(AlternativeConnections);
     to.WriteInt32(StartDate);
 }
Exemplo n.º 10
0
 public override void Write(TLBinaryWriter to)
 {
     to.WriteInt64(Id);
     to.WriteInt32(Parts);
     to.WriteString(Name ?? string.Empty);
     to.WriteString(Md5Checksum ?? string.Empty);
 }
Exemplo n.º 11
0
 public override void Write(TLBinaryWriter to)
 {
     to.WriteInt64(Id);
     to.WriteInt32(Date);
     to.WriteInt32(UserId);
     to.WriteObject(Action);
 }
Exemplo n.º 12
0
 public override void Write(TLBinaryWriter to)
 {
     to.WriteInt64(ClientId);
     to.WriteString(Phone ?? string.Empty);
     to.WriteString(FirstName ?? string.Empty);
     to.WriteString(LastName ?? string.Empty);
 }
Exemplo n.º 13
0
 public override void Write(TLBinaryWriter to)
 {
     to.WriteInt64(QueryId);
     to.WriteInt32(UserId);
     to.WriteByteArray(Payload);
     to.WriteObject(ShippingAddress);
 }
Exemplo n.º 14
0
 public override void Write(TLBinaryWriter to)
 {
     to.WriteDouble(Time);
     to.WriteString(Type ?? string.Empty);
     to.WriteInt64(Peer);
     to.WriteString(Data ?? string.Empty);
 }
Exemplo n.º 15
0
 public override void Write(TLBinaryWriter to)
 {
     to.WriteInt64(RandomId);
     to.WriteInt32(ChatId);
     to.WriteInt32(Date);
     to.WriteByteArray(Bytes);
 }
Exemplo n.º 16
0
        public override void Write(TLBinaryWriter to)
        {
            UpdateFlags();

            to.WriteInt32((Int32)Flags);
            to.WriteInt64(Id);
            to.WriteInt64(AccessHash);
            to.WriteInt32(Date);
            to.WriteInt32(AdminId);
            to.WriteInt32(ParticipantId);
            to.WriteObject(Protocol);
            if (HasReceiveDate)
            {
                to.WriteInt32(ReceiveDate.Value);
            }
        }
Exemplo n.º 17
0
        public override void Write(TLBinaryWriter to)
        {
            UpdateFlags();

            to.WriteInt32((Int32)Flags);
            to.WriteInt32(Id);
            if (HasAccessHash)
            {
                to.WriteInt64(AccessHash.Value);
            }
            to.WriteString(Title ?? string.Empty);
            if (HasUsername)
            {
                to.WriteString(Username ?? string.Empty);
            }
            to.WriteObject(Photo);
            to.WriteInt32(Date);
            to.WriteInt32(Version);
            if (HasRestrictionReason)
            {
                to.WriteString(RestrictionReason ?? string.Empty);
            }
            if (HasAdminRights)
            {
                to.WriteObject(AdminRights);
            }
            if (HasBannedRights)
            {
                to.WriteObject(BannedRights);
            }
            if (HasParticipantsCount)
            {
                to.WriteInt32(ParticipantsCount.Value);
            }
        }
Exemplo n.º 18
0
        public override void Write(TLBinaryWriter to)
        {
            UpdateFlags();

            to.WriteInt32((Int32)Flags);
            to.WriteInt64(Id);
            to.WriteInt64(AccessHash);
            to.WriteString(ShortName ?? string.Empty);
            to.WriteString(Title ?? string.Empty);
            to.WriteString(Description ?? string.Empty);
            to.WriteObject(Photo);
            if (HasDocument)
            {
                to.WriteObject(Document);
            }
        }
Exemplo n.º 19
0
 public override void Write(TLBinaryWriter to)
 {
     to.WriteInt64(Id);
     to.WriteString(Ip ?? string.Empty);
     to.WriteString(Ipv6 ?? string.Empty);
     to.WriteInt32(Port);
     to.WriteByteArray(PeerTag);
 }
Exemplo n.º 20
0
 public override void Write(TLBinaryWriter to)
 {
     to.WriteInt32(Id);
     to.WriteInt64(AccessHash);
     to.WriteInt32(Date);
     to.WriteInt32(AdminId);
     to.WriteInt32(ParticipantId);
 }
Exemplo n.º 21
0
        public override void Write(TLBinaryWriter to)
        {
            UpdateFlags();

            to.WriteInt32((Int32)Flags);
            to.WriteInt64(QueryId);
            to.WriteInt32(UserId);
            to.WriteObject(MsgId);
            to.WriteInt64(ChatInstance);
            if (HasData)
            {
                to.WriteByteArray(Data);
            }
            if (HasGameShortName)
            {
                to.WriteString(GameShortName ?? string.Empty);
            }
        }
        public override void Write(TLBinaryWriter to)
        {
            UpdateFlags();

            to.WriteInt32((Int32)Flags);
            to.WriteInt64(QueryId);
            to.WriteInt32(UserId);
            to.WriteByteArray(Payload);
            if (HasInfo)
            {
                to.WriteObject(Info);
            }
            if (HasShippingOptionId)
            {
                to.WriteString(ShippingOptionId ?? string.Empty);
            }
            to.WriteString(Currency ?? string.Empty);
            to.WriteInt64(TotalAmount);
        }
Exemplo n.º 23
0
        public override void Write(TLBinaryWriter to)
        {
            UpdateFlags();

            to.WriteInt32((Int32)Flags);
            to.WriteInt32(Id);
            if (HasFromId)
            {
                to.WriteInt32(FromId.Value);
            }
            to.WriteObject(ToId);
            if (HasFwdFrom)
            {
                to.WriteObject(FwdFrom);
            }
            if (HasViaBotId)
            {
                to.WriteInt32(ViaBotId.Value);
            }
            if (HasReplyToMsgId)
            {
                to.WriteInt32(ReplyToMsgId.Value);
            }
            to.WriteInt32(Date);
            to.WriteString(Message ?? string.Empty);
            if (HasMedia)
            {
                to.WriteObject(Media);
            }
            if (HasReplyMarkup)
            {
                to.WriteObject(ReplyMarkup);
            }
            if (HasEntities)
            {
                to.WriteObject(Entities);
            }
            if (HasViews)
            {
                to.WriteInt32(Views.Value);
            }
            if (HasEditDate)
            {
                to.WriteInt32(EditDate.Value);
            }
            if (HasPostAuthor)
            {
                to.WriteString(PostAuthor ?? string.Empty);
            }
            if (HasGroupedId)
            {
                to.WriteInt64(GroupedId.Value);
            }
        }
Exemplo n.º 24
0
 public override void Write(TLBinaryWriter to)
 {
     to.WriteInt64(Hash);
     to.WriteInt32(BotId);
     to.WriteString(Domain ?? string.Empty);
     to.WriteString(Browser ?? string.Empty);
     to.WriteString(Platform ?? string.Empty);
     to.WriteInt32(DateCreated);
     to.WriteInt32(DateActive);
     to.WriteString(Ip ?? string.Empty);
     to.WriteString(Region ?? string.Empty);
 }
Exemplo n.º 25
0
        public override void Write(TLBinaryWriter to)
        {
            UpdateFlags();

            to.WriteInt32((Int32)Flags);
            to.WriteInt32(Id);
            to.WriteInt64(AccessHash);
            to.WriteString(Title ?? string.Empty);
            if (HasUntilDate)
            {
                to.WriteInt32(UntilDate.Value);
            }
        }
Exemplo n.º 26
0
        public override void Write(TLBinaryWriter to)
        {
            UpdateFlags();

            to.WriteInt32((Int32)Flags);
            to.WriteInt32(Id);
            if (HasAccessHash)
            {
                to.WriteInt64(AccessHash.Value);
            }
            if (HasFirstName)
            {
                to.WriteString(FirstName ?? string.Empty);
            }
            if (HasLastName)
            {
                to.WriteString(LastName ?? string.Empty);
            }
            if (HasUsername)
            {
                to.WriteString(Username ?? string.Empty);
            }
            if (HasPhone)
            {
                to.WriteString(Phone ?? string.Empty);
            }
            if (HasPhoto)
            {
                to.WriteObject(Photo);
            }
            if (HasStatus)
            {
                to.WriteObject(Status);
            }
            if (HasBotInfoVersion)
            {
                to.WriteInt32(BotInfoVersion.Value);
            }
            if (HasRestrictionReason)
            {
                to.WriteString(RestrictionReason ?? string.Empty);
            }
            if (HasBotInlinePlaceholder)
            {
                to.WriteString(BotInlinePlaceholder ?? string.Empty);
            }
            if (HasLangCode)
            {
                to.WriteString(LangCode ?? string.Empty);
            }
        }
Exemplo n.º 27
0
        public override void Write(TLBinaryWriter to)
        {
            UpdateFlags();

            to.WriteInt32((Int32)Flags);
            to.WriteInt64(QueryId);
            to.WriteInt32(UserId);
            to.WriteString(Query ?? string.Empty);
            if (HasGeo)
            {
                to.WriteObject(Geo);
            }
            to.WriteString(Offset ?? string.Empty);
        }
Exemplo n.º 28
0
        public override void Write(TLBinaryWriter to)
        {
            UpdateFlags();

            to.WriteInt32((Int32)Flags);
            to.WriteInt64(Id);
            if (HasReason)
            {
                to.WriteObject(Reason);
            }
            if (HasDuration)
            {
                to.WriteInt32(Duration.Value);
            }
        }
Exemplo n.º 29
0
 public override void Write(TLBinaryWriter to)
 {
     to.WriteInt64(Hash);
     to.WriteInt32(Flags);
     to.WriteString(DeviceModel ?? string.Empty);
     to.WriteString(Platform ?? string.Empty);
     to.WriteString(SystemVersion ?? string.Empty);
     to.WriteInt32(ApiId);
     to.WriteString(AppName ?? string.Empty);
     to.WriteString(AppVersion ?? string.Empty);
     to.WriteInt32(DateCreated);
     to.WriteInt32(DateActive);
     to.WriteString(Ip ?? string.Empty);
     to.WriteString(Country ?? string.Empty);
     to.WriteString(Region ?? string.Empty);
 }
Exemplo n.º 30
0
        public static void Write <T>(TLBinaryWriter to, object value)
        {
            if (value == null)
            {
                to.WriteUInt32(0x56730BCC);
                return;
            }

            var type = typeof(T);

            if (type == typeof(UInt32))
            {
                to.WriteUInt32((uint)value);
            }
            else if (type == typeof(Int32))
            {
                to.WriteInt32((int)value);
            }
            else if (type == typeof(UInt64))
            {
                to.WriteUInt64((ulong)value);
            }
            else if (type == typeof(Int64))
            {
                to.WriteInt64((long)value);
            }
            else if (type == typeof(Double))
            {
                to.WriteDouble((double)value);
            }
            else if (type == typeof(Boolean))
            {
                to.WriteBoolean((bool)value);
            }
            else if (type == typeof(String))
            {
                to.WriteString((string)value);
            }
            else if (type == typeof(Byte[]))
            {
                to.WriteByteArray((byte[])value);
            }
            else
            {
                to.WriteObject((TLObject)value);
            }
        }