Ejemplo n.º 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);
        }
Ejemplo n.º 2
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);
            }
        }
Ejemplo n.º 3
0
        public override void ToStream(Stream output)
        {
            output.Write(TLUtils.SignatureToBytes(Signature));
            output.Write(Id.ToBytes());
            output.Write(Title.ToBytes());
            output.Write(Date.ToBytes());

            Participants.NullableToStream(output);
            NotifySettings.NullableToStream(output);
        }
Ejemplo n.º 4
0
 public override byte[] ToBytes()
 {
     return(TLUtils.Combine(
                TLUtils.SignatureToBytes(Signature),
                Id.ToBytes(),
                AccessHash.ToBytes(),
                UserId.ToBytes(),
                Date.ToBytes(),
                Duration.ToBytes(),
                MimeType.ToBytes(),
                Size.ToBytes(),
                DCId.ToBytes()));
 }
Ejemplo n.º 5
0
        public override void ToStream(Stream output)
        {
            output.Write(TLUtils.SignatureToBytes(Signature));
            output.Write(RandomId.ToBytes());
            output.Write(RandomBytes.ToBytes());
            output.Write(Action.ToBytes());

            ChatId.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());
        }