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); } }
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); }
public override byte[] ToBytes() { return(TLUtils.Combine( TLUtils.SignatureToBytes(Signature), Peer.ToBytes(), RandomId.ToBytes(), Data.ToBytes())); }
public override byte[] ToBytes() { return(TLUtils.Combine( TLUtils.SignatureToBytes(Signature), RandomId.ToBytes(), RandomBytes.ToBytes(), Action.ToBytes())); }
public override byte[] ToBytes() { return(TLUtils.Combine( TLUtils.SignatureToBytes(Signature), Contacts.ToBytes(), RandomId.ToBytes(), Message.ToBytes(), Media.ToBytes())); }
public override byte[] ToBytes() { return(TLUtils.Combine( TLUtils.SignatureToBytes(Signature), UserId.ToBytes(), RandomId.ToBytes(), GAHash.ToBytes(), Protocol.ToBytes())); }
public override byte[] ToBytes() { System.Diagnostics.Debug.WriteLine(" <<TLDecryptedMessageService.ToBytes random_id={0} action=[{1}]", RandomId, Action); return(TLUtils.Combine( TLUtils.SignatureToBytes(Signature), RandomId.ToBytes(), RandomBytes.ToBytes(), Action.ToBytes())); }
public override byte[] ToBytes() { return(TLUtils.Combine( TLUtils.SignatureToBytes(Signature), Media.ToBytes(), Flags.ToBytes(), RandomId.ToBytes(), Message.ToBytes(), ToBytes(Entities, Flags, (int)InputSingleMediaFlags.Entities))); }
public override byte[] ToBytes() { return(TLUtils.Combine( TLUtils.SignatureToBytes(Signature), Bot.ToBytes(), Peer.ToBytes(), RandomId.ToBytes(), StartParam.ToBytes() )); }
public override byte[] ToBytes() { return(TLUtils.Combine( TLUtils.SignatureToBytes(Signature), Flags.ToBytes(), Peer.ToBytes(), ToBytes(ReplyToMsgId, Flags, (int)SendFlags.ReplyToMsgId), RandomId.ToBytes(), QueryId.ToBytes(), Id.ToBytes())); }
public override byte[] ToBytes() { System.Diagnostics.Debug.WriteLine(" <<TLDecryptedMessage17.ToBytes random_id={0} ttl={1} message={2} media=[{3}]", RandomId, TTL, Message, Media); return(TLUtils.Combine( TLUtils.SignatureToBytes(Signature), RandomId.ToBytes(), TTL.ToBytes(), Message.ToBytes(), Media.ToBytes())); }
public override byte[] ToBytes() { System.Diagnostics.Debug.WriteLine(" <<TLDecryptedMessage.ToBytes message={0} media=[{1}]", Message, Media); return(TLUtils.Combine( TLUtils.SignatureToBytes(Signature), RandomId.ToBytes(), RandomBytes.ToBytes(), Message.ToBytes(), Media.ToBytes())); }
public override byte[] ToBytes() { return(TLUtils.Combine( TLUtils.SignatureToBytes(Signature), Flags.ToBytes(), Peer.ToBytes(), ToBytes(ReplyToMsgId, Flags, (int)SendFlags.Reply), Media.ToBytes(), RandomId.ToBytes(), ToBytes(ReplyMarkup, Flags, (int)SendFlags.ReplyMarkup) )); }
public override byte[] ToBytes() { System.Diagnostics.Debug.WriteLine(" <<TLDecryptedMessage45.ToBytes random_id={0} ttl={1} message={2} media=[{3}]", RandomId, TTL, Message, Media); return(TLUtils.Combine( TLUtils.SignatureToBytes(Signature), Flags.ToBytes(), RandomId.ToBytes(), TTL.ToBytes(), Message.ToBytes(), ToBytes(Media, Flags, (int)MessageFlags.Media), ToBytes(Entities, Flags, (int)MessageFlags.Entities), ToBytes(ViaBotName, Flags, (int)MessageFlags.ViaBotId), ToBytes(ReplyToRandomMsgId, Flags, (int)MessageFlags.ReplyToMsgId))); }
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()); }
public override byte[] ToBytes() { byte[] bytes = null; try { bytes = TLUtils.Combine( TLUtils.SignatureToBytes(Signature), UserId.ToBytes(), RandomId.ToBytes(), G_A.ToBytes()); } catch (Exception ex) { var str = "TLRequestEncryption.ToBytes error user_id=" + UserId + " random_id=" + RandomId + " g_a=" + G_A; Log.Write(str); Execute.ShowDebugMessage(ex.ToString()); } return(bytes); }