Пример #1
0
        public override void ToStream(Stream output)
        {
            output.Write(TLUtils.SignatureToBytes(Signature));
            output.Write(RandomId.ToBytes());
            output.Write(TTL.ToBytes());
            //output.Write(RandomBytes.ToBytes());
            output.Write(Message.ToBytes());
            Media.ToStream(output);

            ChatId.NullableToStream(output);
            InputFile.NullableToStream(output);
            FromId.NullableToStream(output);
            Out.NullableToStream(output);
            Unread.NullableToStream(output);
            Date.NullableToStream(output);
            DeleteDate.NullableToStream(output);
            Qts.NullableToStream(output);

            var status = new TLInt((int)Status);

            output.Write(status.ToBytes());

            InSeqNo.NullableToStream(output);
            OutSeqNo.NullableToStream(output);
            CustomFlags.NullableToStream(output);
        }
Пример #2
0
        public override void ToStream(Stream output)
        {
            output.Write(TLUtils.SignatureToBytes(Signature));
            output.Write(Flags.ToBytes());

            CustomFlags.NullableToStream(output);
        }
Пример #3
0
        public override void ToStream(Stream output)
        {
            output.Write(TLUtils.SignatureToBytes(Signature));
            output.Write(Flags.ToBytes());
            output.Write(RandomId.ToBytes());
            output.Write(TTL.ToBytes());
            output.Write(Message.ToBytes());
            ToStream(output, Media, Flags, (int)MessageFlags.Media);
            ToStream(output, Entities, Flags, (int)MessageFlags.Entities);
            ToStream(output, ViaBotName, Flags, (int)MessageFlags.ViaBotId);
            ToStream(output, ReplyToRandomMsgId, Flags, (int)MessageFlags.ReplyToMsgId);

            ChatId.NullableToStream(output);
            InputFile.NullableToStream(output);
            FromId.NullableToStream(output);
            Out.NullableToStream(output);
            Unread.NullableToStream(output);
            Date.NullableToStream(output);
            DeleteDate.NullableToStream(output);
            Qts.NullableToStream(output);

            var status = new TLInt((int)Status);

            output.Write(status.ToBytes());

            InSeqNo.NullableToStream(output);
            OutSeqNo.NullableToStream(output);
            CustomFlags.NullableToStream(output);

            if (IsSet(CustomFlags, (int)MessageCustomFlags.BotInlineResult))
            {
                _inlineBotResult.ToStream(output);
            }
        }
Пример #4
0
        public override void ToStream(Stream output)
        {
            output.Write(TLUtils.SignatureToBytes(Signature));
            output.Write(Id.ToBytes());
            output.Write(AccessHash.ToBytes());
            output.Write(Date.ToBytes());
            output.Write(AdminId.ToBytes());
            output.Write(ParticipantId.ToBytes());
            output.Write(GAorB.ToBytes());

            Key.NullableToStream(output);
            KeyFingerprint.NullableToStream(output);
            P.NullableToStream(output);
            G.NullableToStream(output);
            A.NullableToStream(output);
            MessageTTL.NullableToStream(output);

            CustomFlags.NullableToStream(output);
            ToStream(output, OriginalKey, CustomFlags, (int)EncryptedChatCustomFlags.OriginalKey);
            ToStream(output, ExtendedKey, CustomFlags, (int)EncryptedChatCustomFlags.ExtendedKey);

            RawInSeqNo.NullableToStream(output);
            RawOutSeqNo.NullableToStream(output);
            Layer.NullableToStream(output);
        }
Пример #5
0
        public override void ToStream(Stream output)
        {
            output.Write(TLUtils.SignatureToBytes(Signature));
            Id.ToStream(output);
            Title.ToStream(output);
            Sizes.ToStream(output);
            Color.ToStream(output);

            CustomFlags.NullableToStream(output);
        }
Пример #6
0
        public override void ToStream(Stream output)
        {
            output.Write(TLUtils.SignatureToBytes(Signature));
            Id.ToStream(output);
            Hostname.ToStream(output);
            IpAddress.ToStream(output);
            Port.ToStream(output);

            CustomFlags.NullableToStream(output);
        }
Пример #7
0
        public override void ToStream(Stream output)
        {
            output.Write(TLUtils.SignatureToBytes(Signature));
            Expires.ToStream(output);
            Peer.ToStream(output);
            Chats.ToStream(output);
            Users.ToStream(output);

            CustomFlags.NullableToStream(output);
        }
Пример #8
0
        public override void ToStream(Stream output)
        {
            output.Write(TLUtils.SignatureToBytes(Signature));
            output.Write(Id.ToBytes());

            Key.NullableToStream(output);
            KeyFingerprint.NullableToStream(output);
            P.NullableToStream(output);
            G.NullableToStream(output);
            A.NullableToStream(output);
            MessageTTL.NullableToStream(output);

            CustomFlags.NullableToStream(output);
            ToStream(output, OriginalKey, CustomFlags, (int)EncryptedChatCustomFlags.OriginalKey);
            ToStream(output, ExtendedKey, CustomFlags, (int)EncryptedChatCustomFlags.ExtendedKey);
        }
Пример #9
0
        public override void ToStream(Stream output)
        {
            try
            {
                output.Write(TLUtils.SignatureToBytes(Signature));

                output.Write(Flags.ToBytes());
                output.Write(Id.ToBytes());
                output.Write(AccessHash.ToBytes());
                output.Write(Title.ToBytes());
                if (IsSet(Flags, (int)ChannelFlags.Public))
                {
                    UserName.ToStream(output);
                }
                Photo.ToStream(output);
                Date.ToStream(output);
                Version.ToStream(output);

                CustomFlags.NullableToStream(output);

                ParticipantIds.NullableToStream(output);
                About.NullableToStream(output);
                ParticipantsCount.NullableToStream(output);
                AdminsCount.NullableToStream(output);
                KickedCount.NullableToStream(output);
                ReadInboxMaxId.NullableToStream(output);
                Pts.NullableToStream(output);
                Participants.NullableToStream(output);
                NotifySettings.NullableToStream(output);

                if (IsSet(CustomFlags, (int)ChannelCustomFlags.MigratedFromChatId))
                {
                    _migratedFromChatId.ToStream(output);
                }
                if (IsSet(CustomFlags, (int)ChannelCustomFlags.MigratedFromMaxId))
                {
                    _migratedFromMaxId.ToStream(output);
                }
            }
            catch (Exception ex)
            {
            }
        }
Пример #10
0
        public override void ToStream(Stream output)
        {
            output.Write(TLUtils.SignatureToBytes(Signature));
            output.Write(Flags.ToBytes());
            output.Write(Id.ToBytes());
            output.Write(Title.ToBytes());
            Photo.ToStream(output);
            output.Write(ParticipantsCount.ToBytes());
            output.Write(Date.ToBytes());
            //output.Write(Left.ToBytes());
            output.Write(Version.ToBytes());
            if (IsSet(Flags, (int)ChatFlags.MigratedTo))
            {
                MigratedTo.ToStream(output);
            }

            Participants.NullableToStream(output);
            NotifySettings.NullableToStream(output);

            CustomFlags.NullableToStream(output);
        }