Mark most classes as sealed & partial

This commit is contained in:
Wizou 2024-03-26 02:30:16 +01:00
parent 018f535655
commit 9fe1196606
15 changed files with 1933 additions and 1932 deletions

2
.github/dev.yml vendored
View file

@ -1,7 +1,7 @@
pr: none pr: none
trigger: [ master ] trigger: [ master ]
name: 3.7.2-dev.$(Rev:r) name: 4.0.0-dev.$(Rev:r)
pool: pool:
vmImage: ubuntu-latest vmImage: ubuntu-latest

2
.github/release.yml vendored
View file

@ -1,7 +1,7 @@
pr: none pr: none
trigger: none trigger: none
name: 3.7.$(Rev:r) name: 4.0.0
pool: pool:
vmImage: ubuntu-latest vmImage: ubuntu-latest

2
.gitignore vendored
View file

@ -3,6 +3,8 @@
## ##
## Get latest from https://github.com/github/gitignore/blob/master/VisualStudio.gitignore ## Get latest from https://github.com/github/gitignore/blob/master/VisualStudio.gitignore
launchSettings.json
# User-specific files # User-specific files
*.rsuser *.rsuser
*.suo *.suo

View file

@ -625,7 +625,7 @@ namespace WTelegram
return new RpcResult { req_msg_id = msgId, result = result }; return new RpcResult { req_msg_id = msgId, result = result };
} }
class Rpc private sealed class Rpc
{ {
internal Type type; internal Type type;
internal TaskCompletionSource<object> tcs = new(TaskCreationOptions.RunContinuationsAsynchronously); internal TaskCompletionSource<object> tcs = new(TaskCreationOptions.RunContinuationsAsynchronously);

View file

@ -319,7 +319,7 @@ j4WcDuXc2CTHgH8gFTNhp/Y8/SpDOhvn9QIDAQAB
} }
#if OBFUSCATION #if OBFUSCATION
internal class AesCtr(byte[] key, byte[] ivec) : IDisposable internal sealed class AesCtr(byte[] key, byte[] ivec) : IDisposable
{ {
readonly ICryptoTransform _encryptor = AesECB.CreateEncryptor(key, null); readonly ICryptoTransform _encryptor = AesECB.CreateEncryptor(key, null);
readonly byte[] _ecount = new byte[16]; readonly byte[] _ecount = new byte[16];
@ -518,7 +518,7 @@ j4WcDuXc2CTHgH8gFTNhp/Y8/SpDOhvn9QIDAQAB
#endif #endif
} }
internal class AES_IGE_Stream : Helpers.IndirectStream internal sealed class AES_IGE_Stream : Helpers.IndirectStream
{ {
private readonly ICryptoTransform _aesCrypto; private readonly ICryptoTransform _aesCrypto;
private readonly byte[] _prevBytes; private readonly byte[] _prevBytes;

View file

@ -37,7 +37,7 @@ namespace WTelegram
private const int ThresholdPFS = 100; private const int ThresholdPFS = 100;
[TLDef(0xFEFEFEFE)] [TLDef(0xFEFEFEFE)]
internal class SecretChat : IObject, ISecretChat internal sealed class SecretChat : IObject, ISecretChat
{ {
[Flags] public enum Flags : uint { requestChat = 1, renewKey = 2, acceptKey = 4, originator = 8, commitKey = 16 } [Flags] public enum Flags : uint { requestChat = 1, renewKey = 2, acceptKey = 4, originator = 8, commitKey = 16 }
public Flags flags; public Flags flags;

View file

@ -11,7 +11,7 @@ using System.Text.Json;
namespace WTelegram namespace WTelegram
{ {
internal class Session : IDisposable internal sealed partial class Session : IDisposable
{ {
public int ApiId; public int ApiId;
public long UserId; public long UserId;
@ -19,7 +19,7 @@ namespace WTelegram
public Dictionary<int, DCSession> DCSessions = []; public Dictionary<int, DCSession> DCSessions = [];
public TL.DcOption[] DcOptions; public TL.DcOption[] DcOptions;
public class DCSession public sealed class DCSession
{ {
public long Id; public long Id;
public long AuthKeyID; public long AuthKeyID;
@ -158,7 +158,7 @@ namespace WTelegram
} }
} }
internal class SessionStore : FileStream // This class is designed to be high-performance and failure-resilient with Writes (but when you're Andrei, you can't understand that) internal sealed class SessionStore : FileStream // This class is designed to be high-performance and failure-resilient with Writes (but when you're Andrei, you can't understand that)
{ {
public override long Length { get; } public override long Length { get; }
public override long Position { get => base.Position; set { } } public override long Position { get => base.Position; set { } }
@ -192,7 +192,7 @@ namespace WTelegram
} }
} }
internal class ActionStore(byte[] initial, Action<byte[]> save) : MemoryStream(initial ?? []) internal sealed class ActionStore(byte[] initial, Action<byte[]> save) : MemoryStream(initial ?? [])
{ {
public override void Write(byte[] buffer, int offset, int count) => save(buffer[offset..(offset + count)]); public override void Write(byte[] buffer, int offset, int count) => save(buffer[offset..(offset + count)]);
public override void SetLength(long value) { } public override void SetLength(long value) { }

View file

@ -11,7 +11,7 @@ namespace TL
{ {
public static class Extensions public static class Extensions
{ {
internal class CollectorPeer : Peer internal sealed partial class CollectorPeer : Peer
{ {
public override long ID => 0; public override long ID => 0;
internal IDictionary<long, User> _users; internal IDictionary<long, User> _users;

View file

@ -7,7 +7,7 @@ namespace TL
{ {
#pragma warning disable IDE1006 #pragma warning disable IDE1006
[TLDef(0x05162463)] //resPQ#05162463 nonce:int128 server_nonce:int128 pq:bytes server_public_key_fingerprints:Vector<long> = ResPQ [TLDef(0x05162463)] //resPQ#05162463 nonce:int128 server_nonce:int128 pq:bytes server_public_key_fingerprints:Vector<long> = ResPQ
public class ResPQ : IObject public sealed partial class ResPQ : IObject
{ {
public Int128 nonce; public Int128 nonce;
public Int128 server_nonce; public Int128 server_nonce;
@ -16,7 +16,7 @@ namespace TL
} }
[TLDef(0x83C95AEC)] //p_q_inner_data#83c95aec pq:bytes p:bytes q:bytes nonce:int128 server_nonce:int128 new_nonce:int256 = P_Q_inner_data [TLDef(0x83C95AEC)] //p_q_inner_data#83c95aec pq:bytes p:bytes q:bytes nonce:int128 server_nonce:int128 new_nonce:int256 = P_Q_inner_data
public class PQInnerData : IObject public partial class PQInnerData : IObject
{ {
public byte[] pq; public byte[] pq;
public byte[] p; public byte[] p;
@ -26,24 +26,24 @@ namespace TL
public Int256 new_nonce; public Int256 new_nonce;
} }
[TLDef(0xA9F55F95, inheritBefore = true)] //p_q_inner_data_dc#a9f55f95 pq:bytes p:bytes q:bytes nonce:int128 server_nonce:int128 new_nonce:int256 dc:int = P_Q_inner_data [TLDef(0xA9F55F95, inheritBefore = true)] //p_q_inner_data_dc#a9f55f95 pq:bytes p:bytes q:bytes nonce:int128 server_nonce:int128 new_nonce:int256 dc:int = P_Q_inner_data
public class PQInnerDataDc : PQInnerData public sealed partial class PQInnerDataDc : PQInnerData
{ {
public int dc; public int dc;
} }
[TLDef(0x3C6A84D4, inheritBefore = true)] //p_q_inner_data_temp#3c6a84d4 pq:bytes p:bytes q:bytes nonce:int128 server_nonce:int128 new_nonce:int256 expires_in:int = P_Q_inner_data [TLDef(0x3C6A84D4, inheritBefore = true)] //p_q_inner_data_temp#3c6a84d4 pq:bytes p:bytes q:bytes nonce:int128 server_nonce:int128 new_nonce:int256 expires_in:int = P_Q_inner_data
public class PQInnerDataTemp : PQInnerData public sealed partial class PQInnerDataTemp : PQInnerData
{ {
public int expires_in; public int expires_in;
} }
[TLDef(0x56FDDF88, inheritBefore = true)] //p_q_inner_data_temp_dc#56fddf88 pq:bytes p:bytes q:bytes nonce:int128 server_nonce:int128 new_nonce:int256 dc:int expires_in:int = P_Q_inner_data [TLDef(0x56FDDF88, inheritBefore = true)] //p_q_inner_data_temp_dc#56fddf88 pq:bytes p:bytes q:bytes nonce:int128 server_nonce:int128 new_nonce:int256 dc:int expires_in:int = P_Q_inner_data
public class PQInnerDataTempDc : PQInnerData public sealed partial class PQInnerDataTempDc : PQInnerData
{ {
public int dc; public int dc;
public int expires_in; public int expires_in;
} }
[TLDef(0x75A3F765)] //bind_auth_key_inner#75a3f765 nonce:long temp_auth_key_id:long perm_auth_key_id:long temp_session_id:long expires_at:int = BindAuthKeyInner [TLDef(0x75A3F765)] //bind_auth_key_inner#75a3f765 nonce:long temp_auth_key_id:long perm_auth_key_id:long temp_session_id:long expires_at:int = BindAuthKeyInner
public class BindAuthKeyInner : IObject public sealed partial class BindAuthKeyInner : IObject
{ {
public long nonce; public long nonce;
public long temp_auth_key_id; public long temp_auth_key_id;
@ -52,24 +52,24 @@ namespace TL
public DateTime expires_at; public DateTime expires_at;
} }
public abstract class ServerDHParams : IObject public abstract partial class ServerDHParams : IObject
{ {
public Int128 nonce; public Int128 nonce;
public Int128 server_nonce; public Int128 server_nonce;
} }
[TLDef(0x79CB045D, inheritBefore = true)] //server_DH_params_fail#79cb045d nonce:int128 server_nonce:int128 new_nonce_hash:int128 = Server_DH_Params [TLDef(0x79CB045D, inheritBefore = true)] //server_DH_params_fail#79cb045d nonce:int128 server_nonce:int128 new_nonce_hash:int128 = Server_DH_Params
public class ServerDHParamsFail : ServerDHParams public sealed partial class ServerDHParamsFail : ServerDHParams
{ {
public Int128 new_nonce_hash; public Int128 new_nonce_hash;
} }
[TLDef(0xD0E8075C, inheritBefore = true)] //server_DH_params_ok#d0e8075c nonce:int128 server_nonce:int128 encrypted_answer:bytes = Server_DH_Params [TLDef(0xD0E8075C, inheritBefore = true)] //server_DH_params_ok#d0e8075c nonce:int128 server_nonce:int128 encrypted_answer:bytes = Server_DH_Params
public class ServerDHParamsOk : ServerDHParams public sealed partial class ServerDHParamsOk : ServerDHParams
{ {
public byte[] encrypted_answer; public byte[] encrypted_answer;
} }
[TLDef(0xB5890DBA)] //server_DH_inner_data#b5890dba nonce:int128 server_nonce:int128 g:int dh_prime:bytes g_a:bytes server_time:int = Server_DH_inner_data [TLDef(0xB5890DBA)] //server_DH_inner_data#b5890dba nonce:int128 server_nonce:int128 g:int dh_prime:bytes g_a:bytes server_time:int = Server_DH_inner_data
public class ServerDHInnerData : IObject public sealed partial class ServerDHInnerData : IObject
{ {
public Int128 nonce; public Int128 nonce;
public Int128 server_nonce; public Int128 server_nonce;
@ -80,7 +80,7 @@ namespace TL
} }
[TLDef(0x6643B654)] //client_DH_inner_data#6643b654 nonce:int128 server_nonce:int128 retry_id:long g_b:bytes = Client_DH_Inner_Data [TLDef(0x6643B654)] //client_DH_inner_data#6643b654 nonce:int128 server_nonce:int128 retry_id:long g_b:bytes = Client_DH_Inner_Data
public class ClientDHInnerData : IObject public sealed partial class ClientDHInnerData : IObject
{ {
public Int128 nonce; public Int128 nonce;
public Int128 server_nonce; public Int128 server_nonce;
@ -88,23 +88,23 @@ namespace TL
public byte[] g_b; public byte[] g_b;
} }
public abstract class SetClientDHParamsAnswer : IObject public abstract partial class SetClientDHParamsAnswer : IObject
{ {
public Int128 nonce; public Int128 nonce;
public Int128 server_nonce; public Int128 server_nonce;
} }
[TLDef(0x3BCBF734, inheritBefore = true)] //dh_gen_ok#3bcbf734 nonce:int128 server_nonce:int128 new_nonce_hash1:int128 = Set_client_DH_params_answer [TLDef(0x3BCBF734, inheritBefore = true)] //dh_gen_ok#3bcbf734 nonce:int128 server_nonce:int128 new_nonce_hash1:int128 = Set_client_DH_params_answer
public class DhGenOk : SetClientDHParamsAnswer public sealed partial class DhGenOk : SetClientDHParamsAnswer
{ {
public Int128 new_nonce_hash1; public Int128 new_nonce_hash1;
} }
[TLDef(0x46DC1FB9, inheritBefore = true)] //dh_gen_retry#46dc1fb9 nonce:int128 server_nonce:int128 new_nonce_hash2:int128 = Set_client_DH_params_answer [TLDef(0x46DC1FB9, inheritBefore = true)] //dh_gen_retry#46dc1fb9 nonce:int128 server_nonce:int128 new_nonce_hash2:int128 = Set_client_DH_params_answer
public class DhGenRetry : SetClientDHParamsAnswer public sealed partial class DhGenRetry : SetClientDHParamsAnswer
{ {
public Int128 new_nonce_hash2; public Int128 new_nonce_hash2;
} }
[TLDef(0xA69DAE02, inheritBefore = true)] //dh_gen_fail#a69dae02 nonce:int128 server_nonce:int128 new_nonce_hash3:int128 = Set_client_DH_params_answer [TLDef(0xA69DAE02, inheritBefore = true)] //dh_gen_fail#a69dae02 nonce:int128 server_nonce:int128 new_nonce_hash3:int128 = Set_client_DH_params_answer
public class DhGenFail : SetClientDHParamsAnswer public sealed partial class DhGenFail : SetClientDHParamsAnswer
{ {
public Int128 new_nonce_hash3; public Int128 new_nonce_hash3;
} }
@ -120,52 +120,52 @@ namespace TL
} }
[TLDef(0x62D6B459)] //msgs_ack#62d6b459 msg_ids:Vector<long> = MsgsAck [TLDef(0x62D6B459)] //msgs_ack#62d6b459 msg_ids:Vector<long> = MsgsAck
public class MsgsAck : IObject public sealed partial class MsgsAck : IObject
{ {
public long[] msg_ids; public long[] msg_ids;
} }
[TLDef(0xA7EFF811)] //bad_msg_notification#a7eff811 bad_msg_id:long bad_msg_seqno:int error_code:int = BadMsgNotification [TLDef(0xA7EFF811)] //bad_msg_notification#a7eff811 bad_msg_id:long bad_msg_seqno:int error_code:int = BadMsgNotification
public class BadMsgNotification : IObject public partial class BadMsgNotification : IObject
{ {
public long bad_msg_id; public long bad_msg_id;
public int bad_msg_seqno; public int bad_msg_seqno;
public int error_code; public int error_code;
} }
[TLDef(0xEDAB447B, inheritBefore = true)] //bad_server_salt#edab447b bad_msg_id:long bad_msg_seqno:int error_code:int new_server_salt:long = BadMsgNotification [TLDef(0xEDAB447B, inheritBefore = true)] //bad_server_salt#edab447b bad_msg_id:long bad_msg_seqno:int error_code:int new_server_salt:long = BadMsgNotification
public class BadServerSalt : BadMsgNotification public sealed partial class BadServerSalt : BadMsgNotification
{ {
public long new_server_salt; public long new_server_salt;
} }
[TLDef(0xDA69FB52)] //msgs_state_req#da69fb52 msg_ids:Vector<long> = MsgsStateReq [TLDef(0xDA69FB52)] //msgs_state_req#da69fb52 msg_ids:Vector<long> = MsgsStateReq
public class MsgsStateReq : IObject public sealed partial class MsgsStateReq : IObject
{ {
public long[] msg_ids; public long[] msg_ids;
} }
[TLDef(0x04DEB57D)] //msgs_state_info#04deb57d req_msg_id:long info:bytes = MsgsStateInfo [TLDef(0x04DEB57D)] //msgs_state_info#04deb57d req_msg_id:long info:bytes = MsgsStateInfo
public class MsgsStateInfo : IObject public sealed partial class MsgsStateInfo : IObject
{ {
public long req_msg_id; public long req_msg_id;
public byte[] info; public byte[] info;
} }
[TLDef(0x8CC0D131)] //msgs_all_info#8cc0d131 msg_ids:Vector<long> info:bytes = MsgsAllInfo [TLDef(0x8CC0D131)] //msgs_all_info#8cc0d131 msg_ids:Vector<long> info:bytes = MsgsAllInfo
public class MsgsAllInfo : IObject public sealed partial class MsgsAllInfo : IObject
{ {
public long[] msg_ids; public long[] msg_ids;
public byte[] info; public byte[] info;
} }
public abstract class MsgDetailedInfoBase : IObject public abstract partial class MsgDetailedInfoBase : IObject
{ {
public virtual long AnswerMsgId => default; public virtual long AnswerMsgId => default;
public virtual int Bytes => default; public virtual int Bytes => default;
public virtual int Status => default; public virtual int Status => default;
} }
[TLDef(0x276D3EC6)] //msg_detailed_info#276d3ec6 msg_id:long answer_msg_id:long bytes:int status:int = MsgDetailedInfo [TLDef(0x276D3EC6)] //msg_detailed_info#276d3ec6 msg_id:long answer_msg_id:long bytes:int status:int = MsgDetailedInfo
public class MsgDetailedInfo : MsgDetailedInfoBase public sealed partial class MsgDetailedInfo : MsgDetailedInfoBase
{ {
public long msg_id; public long msg_id;
public long answer_msg_id; public long answer_msg_id;
@ -177,7 +177,7 @@ namespace TL
public override int Status => status; public override int Status => status;
} }
[TLDef(0x809DB6DF)] //msg_new_detailed_info#809db6df answer_msg_id:long bytes:int status:int = MsgDetailedInfo [TLDef(0x809DB6DF)] //msg_new_detailed_info#809db6df answer_msg_id:long bytes:int status:int = MsgDetailedInfo
public class MsgNewDetailedInfo : MsgDetailedInfoBase public sealed partial class MsgNewDetailedInfo : MsgDetailedInfoBase
{ {
public long answer_msg_id; public long answer_msg_id;
public int bytes; public int bytes;
@ -189,25 +189,25 @@ namespace TL
} }
[TLDef(0x7D861A08)] //msg_resend_req#7d861a08 msg_ids:Vector<long> = MsgResendReq [TLDef(0x7D861A08)] //msg_resend_req#7d861a08 msg_ids:Vector<long> = MsgResendReq
public class MsgResendReq : IObject public sealed partial class MsgResendReq : IObject
{ {
public long[] msg_ids; public long[] msg_ids;
} }
[TLDef(0x2144CA19)] //rpc_error#2144ca19 error_code:int error_message:string = RpcError [TLDef(0x2144CA19)] //rpc_error#2144ca19 error_code:int error_message:string = RpcError
public class RpcError : IObject public sealed partial class RpcError : IObject
{ {
public int error_code; public int error_code;
public string error_message; public string error_message;
} }
public abstract class RpcDropAnswer : IObject { } public abstract partial class RpcDropAnswer : IObject { }
[TLDef(0x5E2AD36E)] //rpc_answer_unknown#5e2ad36e = RpcDropAnswer [TLDef(0x5E2AD36E)] //rpc_answer_unknown#5e2ad36e = RpcDropAnswer
public class RpcAnswerUnknown : RpcDropAnswer { } public sealed partial class RpcAnswerUnknown : RpcDropAnswer { }
[TLDef(0xCD78E586)] //rpc_answer_dropped_running#cd78e586 = RpcDropAnswer [TLDef(0xCD78E586)] //rpc_answer_dropped_running#cd78e586 = RpcDropAnswer
public class RpcAnswerDroppedRunning : RpcDropAnswer { } public sealed partial class RpcAnswerDroppedRunning : RpcDropAnswer { }
[TLDef(0xA43AD8B7)] //rpc_answer_dropped#a43ad8b7 msg_id:long seq_no:int bytes:int = RpcDropAnswer [TLDef(0xA43AD8B7)] //rpc_answer_dropped#a43ad8b7 msg_id:long seq_no:int bytes:int = RpcDropAnswer
public class RpcAnswerDropped : RpcDropAnswer public sealed partial class RpcAnswerDropped : RpcDropAnswer
{ {
public long msg_id; public long msg_id;
public int seq_no; public int seq_no;
@ -215,7 +215,7 @@ namespace TL
} }
[TLDef(0x0949D9DC)] //future_salt#0949d9dc valid_since:int valid_until:int salt:long = FutureSalt [TLDef(0x0949D9DC)] //future_salt#0949d9dc valid_since:int valid_until:int salt:long = FutureSalt
public class FutureSalt : IObject public sealed partial class FutureSalt : IObject
{ {
public DateTime valid_since; public DateTime valid_since;
public DateTime valid_until; public DateTime valid_until;
@ -223,7 +223,7 @@ namespace TL
} }
[TLDef(0xAE500895)] //future_salts#ae500895 req_msg_id:long now:int salts:vector<future_salt> = FutureSalts [TLDef(0xAE500895)] //future_salts#ae500895 req_msg_id:long now:int salts:vector<future_salt> = FutureSalts
public class FutureSalts : IObject public sealed partial class FutureSalts : IObject
{ {
public long req_msg_id; public long req_msg_id;
public DateTime now; public DateTime now;
@ -231,24 +231,24 @@ namespace TL
} }
[TLDef(0x347773C5)] //pong#347773c5 msg_id:long ping_id:long = Pong [TLDef(0x347773C5)] //pong#347773c5 msg_id:long ping_id:long = Pong
public class Pong : IObject public sealed partial class Pong : IObject
{ {
public long msg_id; public long msg_id;
public long ping_id; public long ping_id;
} }
public abstract class DestroySessionRes : IObject public abstract partial class DestroySessionRes : IObject
{ {
public long session_id; public long session_id;
} }
[TLDef(0xE22045FC)] //destroy_session_ok#e22045fc session_id:long = DestroySessionRes [TLDef(0xE22045FC)] //destroy_session_ok#e22045fc session_id:long = DestroySessionRes
public class DestroySessionOk : DestroySessionRes { } public sealed partial class DestroySessionOk : DestroySessionRes { }
[TLDef(0x62D350C9)] //destroy_session_none#62d350c9 session_id:long = DestroySessionRes [TLDef(0x62D350C9)] //destroy_session_none#62d350c9 session_id:long = DestroySessionRes
public class DestroySessionNone : DestroySessionRes { } public sealed partial class DestroySessionNone : DestroySessionRes { }
public abstract class NewSession : IObject { } public abstract partial class NewSession : IObject { }
[TLDef(0x9EC20908)] //new_session_created#9ec20908 first_msg_id:long unique_id:long server_salt:long = NewSession [TLDef(0x9EC20908)] //new_session_created#9ec20908 first_msg_id:long unique_id:long server_salt:long = NewSession
public class NewSessionCreated : NewSession public sealed partial class NewSessionCreated : NewSession
{ {
public long first_msg_id; public long first_msg_id;
public long unique_id; public long unique_id;
@ -256,7 +256,7 @@ namespace TL
} }
[TLDef(0x9299359F)] //http_wait#9299359f max_delay:int wait_after:int max_wait:int = HttpWait [TLDef(0x9299359F)] //http_wait#9299359f max_delay:int wait_after:int max_wait:int = HttpWait
public class HttpWait : IObject public sealed partial class HttpWait : IObject
{ {
public int max_delay; public int max_delay;
public int wait_after; public int wait_after;
@ -264,19 +264,19 @@ namespace TL
} }
[TLDef(0xD433AD73)] //ipPort#d433ad73 ipv4:int port:int = IpPort [TLDef(0xD433AD73)] //ipPort#d433ad73 ipv4:int port:int = IpPort
public class IpPort : IObject public partial class IpPort : IObject
{ {
public int ipv4; public int ipv4;
public int port; public int port;
} }
[TLDef(0x37982646, inheritBefore = true)] //ipPortSecret#37982646 ipv4:int port:int secret:bytes = IpPort [TLDef(0x37982646, inheritBefore = true)] //ipPortSecret#37982646 ipv4:int port:int secret:bytes = IpPort
public class IpPortSecret : IpPort public sealed partial class IpPortSecret : IpPort
{ {
public byte[] secret; public byte[] secret;
} }
[TLDef(0x4679B65F)] //accessPointRule#4679b65f phone_prefix_rules:bytes dc_id:int ips:vector<IpPort> = AccessPointRule [TLDef(0x4679B65F)] //accessPointRule#4679b65f phone_prefix_rules:bytes dc_id:int ips:vector<IpPort> = AccessPointRule
public class AccessPointRule : IObject public sealed partial class AccessPointRule : IObject
{ {
public byte[] phone_prefix_rules; public byte[] phone_prefix_rules;
public int dc_id; public int dc_id;
@ -284,7 +284,7 @@ namespace TL
} }
[TLDef(0x5A592A6C)] //help.configSimple#5a592a6c date:int expires:int rules:vector<AccessPointRule> = help.ConfigSimple [TLDef(0x5A592A6C)] //help.configSimple#5a592a6c date:int expires:int rules:vector<AccessPointRule> = help.ConfigSimple
public class Help_ConfigSimple : IObject public sealed partial class Help_ConfigSimple : IObject
{ {
public DateTime date; public DateTime date;
public DateTime expires; public DateTime expires;
@ -368,19 +368,19 @@ namespace TL.Methods
{ {
#pragma warning disable IDE1006 #pragma warning disable IDE1006
[TLDef(0x60469778)] //req_pq#60469778 nonce:int128 = ResPQ [TLDef(0x60469778)] //req_pq#60469778 nonce:int128 = ResPQ
public class ReqPq : IMethod<ResPQ> public sealed partial class ReqPq : IMethod<ResPQ>
{ {
public Int128 nonce; public Int128 nonce;
} }
[TLDef(0xBE7E8EF1)] //req_pq_multi#be7e8ef1 nonce:int128 = ResPQ [TLDef(0xBE7E8EF1)] //req_pq_multi#be7e8ef1 nonce:int128 = ResPQ
public class ReqPqMulti : IMethod<ResPQ> public sealed partial class ReqPqMulti : IMethod<ResPQ>
{ {
public Int128 nonce; public Int128 nonce;
} }
[TLDef(0xD712E4BE)] //req_DH_params#d712e4be nonce:int128 server_nonce:int128 p:bytes q:bytes public_key_fingerprint:long encrypted_data:bytes = Server_DH_Params [TLDef(0xD712E4BE)] //req_DH_params#d712e4be nonce:int128 server_nonce:int128 p:bytes q:bytes public_key_fingerprint:long encrypted_data:bytes = Server_DH_Params
public class ReqDHParams : IMethod<ServerDHParams> public sealed partial class ReqDHParams : IMethod<ServerDHParams>
{ {
public Int128 nonce; public Int128 nonce;
public Int128 server_nonce; public Int128 server_nonce;
@ -391,7 +391,7 @@ namespace TL.Methods
} }
[TLDef(0xF5045F1F)] //set_client_DH_params#f5045f1f nonce:int128 server_nonce:int128 encrypted_data:bytes = Set_client_DH_params_answer [TLDef(0xF5045F1F)] //set_client_DH_params#f5045f1f nonce:int128 server_nonce:int128 encrypted_data:bytes = Set_client_DH_params_answer
public class SetClientDHParams : IMethod<SetClientDHParamsAnswer> public sealed partial class SetClientDHParams : IMethod<SetClientDHParamsAnswer>
{ {
public Int128 nonce; public Int128 nonce;
public Int128 server_nonce; public Int128 server_nonce;
@ -399,35 +399,35 @@ namespace TL.Methods
} }
[TLDef(0xD1435160)] //destroy_auth_key#d1435160 = DestroyAuthKeyRes [TLDef(0xD1435160)] //destroy_auth_key#d1435160 = DestroyAuthKeyRes
public class DestroyAuthKey : IMethod<DestroyAuthKeyRes> { } public sealed partial class DestroyAuthKey : IMethod<DestroyAuthKeyRes> { }
[TLDef(0x58E4A740)] //rpc_drop_answer#58e4a740 req_msg_id:long = RpcDropAnswer [TLDef(0x58E4A740)] //rpc_drop_answer#58e4a740 req_msg_id:long = RpcDropAnswer
public class RpcDropAnswer : IMethod<TL.RpcDropAnswer> public sealed partial class RpcDropAnswer : IMethod<TL.RpcDropAnswer>
{ {
public long req_msg_id; public long req_msg_id;
} }
[TLDef(0xB921BD04)] //get_future_salts#b921bd04 num:int = FutureSalts [TLDef(0xB921BD04)] //get_future_salts#b921bd04 num:int = FutureSalts
public class GetFutureSalts : IMethod<FutureSalts> public sealed partial class GetFutureSalts : IMethod<FutureSalts>
{ {
public int num; public int num;
} }
[TLDef(0x7ABE77EC)] //ping#7abe77ec ping_id:long = Pong [TLDef(0x7ABE77EC)] //ping#7abe77ec ping_id:long = Pong
public class Ping : IMethod<Pong> public sealed partial class Ping : IMethod<Pong>
{ {
public long ping_id; public long ping_id;
} }
[TLDef(0xF3427B8C)] //ping_delay_disconnect#f3427b8c ping_id:long disconnect_delay:int = Pong [TLDef(0xF3427B8C)] //ping_delay_disconnect#f3427b8c ping_id:long disconnect_delay:int = Pong
public class PingDelayDisconnect : IMethod<Pong> public sealed partial class PingDelayDisconnect : IMethod<Pong>
{ {
public long ping_id; public long ping_id;
public int disconnect_delay; public int disconnect_delay;
} }
[TLDef(0xE7512126)] //destroy_session#e7512126 session_id:long = DestroySessionRes [TLDef(0xE7512126)] //destroy_session#e7512126 session_id:long = DestroySessionRes
public class DestroySession : IMethod<DestroySessionRes> public sealed partial class DestroySession : IMethod<DestroySessionRes>
{ {
public long session_id; public long session_id;
} }

File diff suppressed because it is too large Load diff

File diff suppressed because it is too large Load diff

View file

@ -4,7 +4,7 @@ namespace TL
{ {
#pragma warning disable IDE1006 #pragma warning disable IDE1006
/// <summary>Object describes the contents of an encrypted message. <para>See <a href="https://corefork.telegram.org/type/DecryptedMessage"/></para></summary> /// <summary>Object describes the contents of an encrypted message. <para>See <a href="https://corefork.telegram.org/type/DecryptedMessage"/></para></summary>
public abstract class DecryptedMessageBase : IObject public abstract partial class DecryptedMessageBase : IObject
{ {
/// <summary>Flags, see <a href="https://corefork.telegram.org/mtproto/TL-combinators#conditional-fields">TL conditional fields</a> (added in layer 45)</summary> /// <summary>Flags, see <a href="https://corefork.telegram.org/mtproto/TL-combinators#conditional-fields">TL conditional fields</a> (added in layer 45)</summary>
public virtual uint FFlags => default; public virtual uint FFlags => default;
@ -30,17 +30,17 @@ namespace TL
/// <summary>Object describes media contents of an encrypted message. <para>See <a href="https://corefork.telegram.org/type/DecryptedMessageMedia"/></para></summary> /// <summary>Object describes media contents of an encrypted message. <para>See <a href="https://corefork.telegram.org/type/DecryptedMessageMedia"/></para></summary>
/// <remarks>a <see langword="null"/> value means <a href="https://corefork.telegram.org/constructor/decryptedMessageMediaEmpty">decryptedMessageMediaEmpty</a></remarks> /// <remarks>a <see langword="null"/> value means <a href="https://corefork.telegram.org/constructor/decryptedMessageMediaEmpty">decryptedMessageMediaEmpty</a></remarks>
public abstract class DecryptedMessageMedia : IObject public abstract partial class DecryptedMessageMedia : IObject
{ {
public virtual string MimeType => default; public virtual string MimeType => default;
internal virtual (long size, byte[] key, byte[] iv) SizeKeyIV { get => default; set => throw new WTelegram.WTException("Incompatible DecryptedMessageMedia"); } internal virtual (long size, byte[] key, byte[] iv) SizeKeyIV { get => default; set => throw new WTelegram.WTException("Incompatible DecryptedMessageMedia"); }
} }
/// <summary>Object describes the action to which a service message is linked. <para>See <a href="https://corefork.telegram.org/type/DecryptedMessageAction"/></para></summary> /// <summary>Object describes the action to which a service message is linked. <para>See <a href="https://corefork.telegram.org/type/DecryptedMessageAction"/></para></summary>
public abstract class DecryptedMessageAction : IObject { } public abstract partial class DecryptedMessageAction : IObject { }
/// <summary>Indicates the location of a photo, will be deprecated soon <para>See <a href="https://corefork.telegram.org/type/FileLocation"/></para></summary> /// <summary>Indicates the location of a photo, will be deprecated soon <para>See <a href="https://corefork.telegram.org/type/FileLocation"/></para></summary>
public abstract class FileLocationBase : IObject public abstract partial class FileLocationBase : IObject
{ {
/// <summary>Server volume</summary> /// <summary>Server volume</summary>
public virtual long VolumeId => default; public virtual long VolumeId => default;
@ -54,7 +54,7 @@ namespace TL
{ {
/// <summary>Contents of an encrypted message. <para>See <a href="https://corefork.telegram.org/constructor/decryptedMessage"/></para></summary> /// <summary>Contents of an encrypted message. <para>See <a href="https://corefork.telegram.org/constructor/decryptedMessage"/></para></summary>
[TLDef(0x1F814F1F)] [TLDef(0x1F814F1F)]
public class DecryptedMessage : DecryptedMessageBase public sealed partial class DecryptedMessage : DecryptedMessageBase
{ {
/// <summary>Random message ID, assigned by the author of message.<br/>Must be equal to the ID passed to sending method.</summary> /// <summary>Random message ID, assigned by the author of message.<br/>Must be equal to the ID passed to sending method.</summary>
public long random_id; public long random_id;
@ -74,7 +74,7 @@ namespace TL
} }
/// <summary>Contents of an encrypted service message. <para>See <a href="https://corefork.telegram.org/constructor/decryptedMessageService"/></para></summary> /// <summary>Contents of an encrypted service message. <para>See <a href="https://corefork.telegram.org/constructor/decryptedMessageService"/></para></summary>
[TLDef(0xAA48327D)] [TLDef(0xAA48327D)]
public class DecryptedMessageService : DecryptedMessageBase public sealed partial class DecryptedMessageService : DecryptedMessageBase
{ {
/// <summary>Random message ID, assigned by the message author.<br/>Must be equal to the ID passed to the sending method.</summary> /// <summary>Random message ID, assigned by the message author.<br/>Must be equal to the ID passed to the sending method.</summary>
public long random_id; public long random_id;
@ -91,7 +91,7 @@ namespace TL
/// <summary>Photo attached to an encrypted message. <para>See <a href="https://corefork.telegram.org/constructor/decryptedMessageMediaPhoto"/></para></summary> /// <summary>Photo attached to an encrypted message. <para>See <a href="https://corefork.telegram.org/constructor/decryptedMessageMediaPhoto"/></para></summary>
[TLDef(0x32798A8C)] [TLDef(0x32798A8C)]
public class DecryptedMessageMediaPhoto : DecryptedMessageMedia public sealed partial class DecryptedMessageMediaPhoto : DecryptedMessageMedia
{ {
/// <summary>Content of thumbnail file (JPEGfile, quality 55, set in a square 90x90)</summary> /// <summary>Content of thumbnail file (JPEGfile, quality 55, set in a square 90x90)</summary>
public byte[] thumb; public byte[] thumb;
@ -115,7 +115,7 @@ namespace TL
} }
/// <summary>Video attached to an encrypted message. <para>See <a href="https://corefork.telegram.org/constructor/decryptedMessageMediaVideo"/></para></summary> /// <summary>Video attached to an encrypted message. <para>See <a href="https://corefork.telegram.org/constructor/decryptedMessageMediaVideo"/></para></summary>
[TLDef(0x4CEE6EF3)] [TLDef(0x4CEE6EF3)]
public class DecryptedMessageMediaVideo : DecryptedMessageMedia public sealed partial class DecryptedMessageMediaVideo : DecryptedMessageMedia
{ {
/// <summary>Content of thumbnail file (JPEG file, quality 55, set in a square 90x90)</summary> /// <summary>Content of thumbnail file (JPEG file, quality 55, set in a square 90x90)</summary>
public byte[] thumb; public byte[] thumb;
@ -140,7 +140,7 @@ namespace TL
} }
/// <summary>GeoPoint attached to an encrypted message. <para>See <a href="https://corefork.telegram.org/constructor/decryptedMessageMediaGeoPoint"/></para></summary> /// <summary>GeoPoint attached to an encrypted message. <para>See <a href="https://corefork.telegram.org/constructor/decryptedMessageMediaGeoPoint"/></para></summary>
[TLDef(0x35480A59)] [TLDef(0x35480A59)]
public class DecryptedMessageMediaGeoPoint : DecryptedMessageMedia public sealed partial class DecryptedMessageMediaGeoPoint : DecryptedMessageMedia
{ {
/// <summary>Latitude of point</summary> /// <summary>Latitude of point</summary>
public double lat; public double lat;
@ -149,7 +149,7 @@ namespace TL
} }
/// <summary>Contact attached to an encrypted message. <para>See <a href="https://corefork.telegram.org/constructor/decryptedMessageMediaContact"/></para></summary> /// <summary>Contact attached to an encrypted message. <para>See <a href="https://corefork.telegram.org/constructor/decryptedMessageMediaContact"/></para></summary>
[TLDef(0x588A0A97)] [TLDef(0x588A0A97)]
public class DecryptedMessageMediaContact : DecryptedMessageMedia public sealed partial class DecryptedMessageMediaContact : DecryptedMessageMedia
{ {
/// <summary>Phone number</summary> /// <summary>Phone number</summary>
public string phone_number; public string phone_number;
@ -162,7 +162,7 @@ namespace TL
} }
/// <summary>Document attached to a message in a secret chat. <para>See <a href="https://corefork.telegram.org/constructor/decryptedMessageMediaDocument"/></para></summary> /// <summary>Document attached to a message in a secret chat. <para>See <a href="https://corefork.telegram.org/constructor/decryptedMessageMediaDocument"/></para></summary>
[TLDef(0xB095434B)] [TLDef(0xB095434B)]
public class DecryptedMessageMediaDocument : DecryptedMessageMedia public sealed partial class DecryptedMessageMediaDocument : DecryptedMessageMedia
{ {
/// <summary>Thumbnail-file contents (JPEG-file, quality 55, set in a 90x90 square)</summary> /// <summary>Thumbnail-file contents (JPEG-file, quality 55, set in a 90x90 square)</summary>
public byte[] thumb; public byte[] thumb;
@ -187,7 +187,7 @@ namespace TL
} }
/// <summary>Audio file attached to a secret chat message. <para>See <a href="https://corefork.telegram.org/constructor/decryptedMessageMediaAudio"/></para></summary> /// <summary>Audio file attached to a secret chat message. <para>See <a href="https://corefork.telegram.org/constructor/decryptedMessageMediaAudio"/></para></summary>
[TLDef(0x6080758F)] [TLDef(0x6080758F)]
public class DecryptedMessageMediaAudio : DecryptedMessageMedia public sealed partial class DecryptedMessageMediaAudio : DecryptedMessageMedia
{ {
/// <summary>Audio duration in seconds</summary> /// <summary>Audio duration in seconds</summary>
public int duration; public int duration;
@ -203,42 +203,42 @@ namespace TL
/// <summary>Setting of a message lifetime after reading. <para>See <a href="https://corefork.telegram.org/constructor/decryptedMessageActionSetMessageTTL"/></para></summary> /// <summary>Setting of a message lifetime after reading. <para>See <a href="https://corefork.telegram.org/constructor/decryptedMessageActionSetMessageTTL"/></para></summary>
[TLDef(0xA1733AEC)] [TLDef(0xA1733AEC)]
public class DecryptedMessageActionSetMessageTTL : DecryptedMessageAction public sealed partial class DecryptedMessageActionSetMessageTTL : DecryptedMessageAction
{ {
/// <summary>Lifetime in seconds</summary> /// <summary>Lifetime in seconds</summary>
public int ttl_seconds; public int ttl_seconds;
} }
/// <summary>Messages marked as read. <para>See <a href="https://corefork.telegram.org/constructor/decryptedMessageActionReadMessages"/></para></summary> /// <summary>Messages marked as read. <para>See <a href="https://corefork.telegram.org/constructor/decryptedMessageActionReadMessages"/></para></summary>
[TLDef(0x0C4F40BE)] [TLDef(0x0C4F40BE)]
public class DecryptedMessageActionReadMessages : DecryptedMessageAction public sealed partial class DecryptedMessageActionReadMessages : DecryptedMessageAction
{ {
/// <summary>List of message IDs</summary> /// <summary>List of message IDs</summary>
public long[] random_ids; public long[] random_ids;
} }
/// <summary>Deleted messages. <para>See <a href="https://corefork.telegram.org/constructor/decryptedMessageActionDeleteMessages"/></para></summary> /// <summary>Deleted messages. <para>See <a href="https://corefork.telegram.org/constructor/decryptedMessageActionDeleteMessages"/></para></summary>
[TLDef(0x65614304)] [TLDef(0x65614304)]
public class DecryptedMessageActionDeleteMessages : DecryptedMessageAction public sealed partial class DecryptedMessageActionDeleteMessages : DecryptedMessageAction
{ {
/// <summary>List of deleted message IDs</summary> /// <summary>List of deleted message IDs</summary>
public long[] random_ids; public long[] random_ids;
} }
/// <summary>A screenshot was taken. <para>See <a href="https://corefork.telegram.org/constructor/decryptedMessageActionScreenshotMessages"/></para></summary> /// <summary>A screenshot was taken. <para>See <a href="https://corefork.telegram.org/constructor/decryptedMessageActionScreenshotMessages"/></para></summary>
[TLDef(0x8AC1F475)] [TLDef(0x8AC1F475)]
public class DecryptedMessageActionScreenshotMessages : DecryptedMessageAction public sealed partial class DecryptedMessageActionScreenshotMessages : DecryptedMessageAction
{ {
/// <summary>List of affected message ids (that appeared on the screenshot)</summary> /// <summary>List of affected message ids (that appeared on the screenshot)</summary>
public long[] random_ids; public long[] random_ids;
} }
/// <summary>The entire message history has been deleted. <para>See <a href="https://corefork.telegram.org/constructor/decryptedMessageActionFlushHistory"/></para></summary> /// <summary>The entire message history has been deleted. <para>See <a href="https://corefork.telegram.org/constructor/decryptedMessageActionFlushHistory"/></para></summary>
[TLDef(0x6719E45C)] [TLDef(0x6719E45C)]
public class DecryptedMessageActionFlushHistory : DecryptedMessageAction { } public sealed partial class DecryptedMessageActionFlushHistory : DecryptedMessageAction { }
} }
namespace Layer23 namespace Layer23
{ {
/// <summary>Image description. <para>See <a href="https://corefork.telegram.org/constructor/photoSize"/></para></summary> /// <summary>Image description. <para>See <a href="https://corefork.telegram.org/constructor/photoSize"/></para></summary>
[TLDef(0x77BFB61B)] [TLDef(0x77BFB61B)]
public partial class PhotoSize : PhotoSizeBase public sealed partial class PhotoSize : PhotoSizeBase
{ {
/// <summary><a href="https://corefork.telegram.org/api/files#image-thumbnail-types">Thumbnail type »</a></summary> /// <summary><a href="https://corefork.telegram.org/api/files#image-thumbnail-types">Thumbnail type »</a></summary>
public string type; public string type;
@ -255,7 +255,7 @@ namespace TL
} }
/// <summary>Description of an image and its content. <para>See <a href="https://corefork.telegram.org/constructor/photoCachedSize"/></para></summary> /// <summary>Description of an image and its content. <para>See <a href="https://corefork.telegram.org/constructor/photoCachedSize"/></para></summary>
[TLDef(0xE9A734FA)] [TLDef(0xE9A734FA)]
public partial class PhotoCachedSize : PhotoSizeBase public sealed partial class PhotoCachedSize : PhotoSizeBase
{ {
/// <summary>Thumbnail type</summary> /// <summary>Thumbnail type</summary>
public string type; public string type;
@ -273,23 +273,23 @@ namespace TL
/// <summary>User is uploading a video. <para>See <a href="https://corefork.telegram.org/constructor/sendMessageUploadVideoAction"/></para></summary> /// <summary>User is uploading a video. <para>See <a href="https://corefork.telegram.org/constructor/sendMessageUploadVideoAction"/></para></summary>
[TLDef(0x92042FF7)] [TLDef(0x92042FF7)]
public class SendMessageUploadVideoAction : SendMessageAction { } public sealed partial class SendMessageUploadVideoAction : SendMessageAction { }
/// <summary>User is uploading a voice message. <para>See <a href="https://corefork.telegram.org/constructor/sendMessageUploadAudioAction"/></para></summary> /// <summary>User is uploading a voice message. <para>See <a href="https://corefork.telegram.org/constructor/sendMessageUploadAudioAction"/></para></summary>
[TLDef(0xE6AC8A6F)] [TLDef(0xE6AC8A6F)]
public class SendMessageUploadAudioAction : SendMessageAction { } public sealed partial class SendMessageUploadAudioAction : SendMessageAction { }
/// <summary>User is uploading a photo. <para>See <a href="https://corefork.telegram.org/constructor/sendMessageUploadPhotoAction"/></para></summary> /// <summary>User is uploading a photo. <para>See <a href="https://corefork.telegram.org/constructor/sendMessageUploadPhotoAction"/></para></summary>
[TLDef(0x990A3C1A)] [TLDef(0x990A3C1A)]
public class SendMessageUploadPhotoAction : SendMessageAction { } public sealed partial class SendMessageUploadPhotoAction : SendMessageAction { }
/// <summary>User is uploading a file. <para>See <a href="https://corefork.telegram.org/constructor/sendMessageUploadDocumentAction"/></para></summary> /// <summary>User is uploading a file. <para>See <a href="https://corefork.telegram.org/constructor/sendMessageUploadDocumentAction"/></para></summary>
[TLDef(0x8FAEE98E)] [TLDef(0x8FAEE98E)]
public class SendMessageUploadDocumentAction : SendMessageAction { } public sealed partial class SendMessageUploadDocumentAction : SendMessageAction { }
/// <summary>Defines a sticker <para>See <a href="https://corefork.telegram.org/constructor/documentAttributeSticker"/></para></summary> /// <summary>Defines a sticker <para>See <a href="https://corefork.telegram.org/constructor/documentAttributeSticker"/></para></summary>
[TLDef(0xFB0A5727)] [TLDef(0xFB0A5727)]
public class DocumentAttributeSticker : DocumentAttribute { } public sealed partial class DocumentAttributeSticker : DocumentAttribute { }
/// <summary>Defines a video <para>See <a href="https://corefork.telegram.org/constructor/documentAttributeVideo"/></para></summary> /// <summary>Defines a video <para>See <a href="https://corefork.telegram.org/constructor/documentAttributeVideo"/></para></summary>
[TLDef(0x5910CCCB)] [TLDef(0x5910CCCB)]
public class DocumentAttributeVideo : DocumentAttribute public sealed partial class DocumentAttributeVideo : DocumentAttribute
{ {
/// <summary>Duration in seconds</summary> /// <summary>Duration in seconds</summary>
public int duration; public int duration;
@ -300,7 +300,7 @@ namespace TL
} }
/// <summary>Represents an audio file <para>See <a href="https://corefork.telegram.org/constructor/documentAttributeAudio"/></para></summary> /// <summary>Represents an audio file <para>See <a href="https://corefork.telegram.org/constructor/documentAttributeAudio"/></para></summary>
[TLDef(0x051448E5)] [TLDef(0x051448E5)]
public class DocumentAttributeAudio : DocumentAttribute public sealed partial class DocumentAttributeAudio : DocumentAttribute
{ {
/// <summary>Duration in seconds</summary> /// <summary>Duration in seconds</summary>
public int duration; public int duration;
@ -308,7 +308,7 @@ namespace TL
/// <summary>Contents of an encrypted message. <para>See <a href="https://corefork.telegram.org/constructor/decryptedMessage"/></para></summary> /// <summary>Contents of an encrypted message. <para>See <a href="https://corefork.telegram.org/constructor/decryptedMessage"/></para></summary>
[TLDef(0x204D3878)] [TLDef(0x204D3878)]
public class DecryptedMessage : DecryptedMessageBase public sealed partial class DecryptedMessage : DecryptedMessageBase
{ {
/// <summary>Random message ID, assigned by the author of message.<br/>Must be equal to the ID passed to sending method.</summary> /// <summary>Random message ID, assigned by the author of message.<br/>Must be equal to the ID passed to sending method.</summary>
public long random_id; public long random_id;
@ -330,7 +330,7 @@ namespace TL
} }
/// <summary>Contents of an encrypted service message. <para>See <a href="https://corefork.telegram.org/constructor/decryptedMessageService"/></para></summary> /// <summary>Contents of an encrypted service message. <para>See <a href="https://corefork.telegram.org/constructor/decryptedMessageService"/></para></summary>
[TLDef(0x73164160)] [TLDef(0x73164160)]
public class DecryptedMessageService : DecryptedMessageBase public sealed partial class DecryptedMessageService : DecryptedMessageBase
{ {
/// <summary>Random message ID, assigned by the message author.<br/>Must be equal to the ID passed to the sending method.</summary> /// <summary>Random message ID, assigned by the message author.<br/>Must be equal to the ID passed to the sending method.</summary>
public long random_id; public long random_id;
@ -345,7 +345,7 @@ namespace TL
/// <summary>Video attached to an encrypted message. <para>See <a href="https://corefork.telegram.org/constructor/decryptedMessageMediaVideo"/></para></summary> /// <summary>Video attached to an encrypted message. <para>See <a href="https://corefork.telegram.org/constructor/decryptedMessageMediaVideo"/></para></summary>
[TLDef(0x524A415D)] [TLDef(0x524A415D)]
public class DecryptedMessageMediaVideo : DecryptedMessageMedia public sealed partial class DecryptedMessageMediaVideo : DecryptedMessageMedia
{ {
/// <summary>Content of thumbnail file (JPEG file, quality 55, set in a square 90x90)</summary> /// <summary>Content of thumbnail file (JPEG file, quality 55, set in a square 90x90)</summary>
public byte[] thumb; public byte[] thumb;
@ -375,7 +375,7 @@ namespace TL
} }
/// <summary>Audio file attached to a secret chat message. <para>See <a href="https://corefork.telegram.org/constructor/decryptedMessageMediaAudio"/></para></summary> /// <summary>Audio file attached to a secret chat message. <para>See <a href="https://corefork.telegram.org/constructor/decryptedMessageMediaAudio"/></para></summary>
[TLDef(0x57E0A9CB)] [TLDef(0x57E0A9CB)]
public class DecryptedMessageMediaAudio : DecryptedMessageMedia public sealed partial class DecryptedMessageMediaAudio : DecryptedMessageMedia
{ {
/// <summary>Audio duration in seconds</summary> /// <summary>Audio duration in seconds</summary>
public int duration; public int duration;
@ -395,7 +395,7 @@ namespace TL
} }
/// <summary>Non-e2e documented forwarded from non-secret chat <para>See <a href="https://corefork.telegram.org/constructor/decryptedMessageMediaExternalDocument"/></para></summary> /// <summary>Non-e2e documented forwarded from non-secret chat <para>See <a href="https://corefork.telegram.org/constructor/decryptedMessageMediaExternalDocument"/></para></summary>
[TLDef(0xFA95B0DD)] [TLDef(0xFA95B0DD)]
public class DecryptedMessageMediaExternalDocument : DecryptedMessageMedia public sealed partial class DecryptedMessageMediaExternalDocument : DecryptedMessageMedia
{ {
/// <summary>Document ID</summary> /// <summary>Document ID</summary>
public long id; public long id;
@ -420,7 +420,7 @@ namespace TL
/// <summary>Request for the other party in a Secret Chat to automatically resend a contiguous range of previously sent messages, as explained in <a href="https://corefork.telegram.org/api/end-to-end/seq_no">Sequence number is Secret Chats</a>. <para>See <a href="https://corefork.telegram.org/constructor/decryptedMessageActionResend"/></para></summary> /// <summary>Request for the other party in a Secret Chat to automatically resend a contiguous range of previously sent messages, as explained in <a href="https://corefork.telegram.org/api/end-to-end/seq_no">Sequence number is Secret Chats</a>. <para>See <a href="https://corefork.telegram.org/constructor/decryptedMessageActionResend"/></para></summary>
[TLDef(0x511110B0)] [TLDef(0x511110B0)]
public class DecryptedMessageActionResend : DecryptedMessageAction public sealed partial class DecryptedMessageActionResend : DecryptedMessageAction
{ {
/// <summary><c>out_seq_no</c> of the first message to be resent, with correct parity</summary> /// <summary><c>out_seq_no</c> of the first message to be resent, with correct parity</summary>
public int start_seq_no; public int start_seq_no;
@ -429,21 +429,21 @@ namespace TL
} }
/// <summary>A notification stating the API layer that is used by the client. You should use your current layer and take notice of the layer used on the other side of a conversation when sending messages. <para>See <a href="https://corefork.telegram.org/constructor/decryptedMessageActionNotifyLayer"/></para></summary> /// <summary>A notification stating the API layer that is used by the client. You should use your current layer and take notice of the layer used on the other side of a conversation when sending messages. <para>See <a href="https://corefork.telegram.org/constructor/decryptedMessageActionNotifyLayer"/></para></summary>
[TLDef(0xF3048883)] [TLDef(0xF3048883)]
public class DecryptedMessageActionNotifyLayer : DecryptedMessageAction public sealed partial class DecryptedMessageActionNotifyLayer : DecryptedMessageAction
{ {
/// <summary>Layer number, must be <strong>17</strong> or higher (this constructor was introduced in Layer 17.</summary> /// <summary>Layer number, must be <strong>17</strong> or higher (this constructor was introduced in Layer 17.</summary>
public int layer; public int layer;
} }
/// <summary>User is preparing a message: typing, recording, uploading, etc. <para>See <a href="https://corefork.telegram.org/constructor/decryptedMessageActionTyping"/></para></summary> /// <summary>User is preparing a message: typing, recording, uploading, etc. <para>See <a href="https://corefork.telegram.org/constructor/decryptedMessageActionTyping"/></para></summary>
[TLDef(0xCCB27641)] [TLDef(0xCCB27641)]
public class DecryptedMessageActionTyping : DecryptedMessageAction public sealed partial class DecryptedMessageActionTyping : DecryptedMessageAction
{ {
/// <summary>Type of action</summary> /// <summary>Type of action</summary>
public SendMessageAction action; public SendMessageAction action;
} }
/// <summary>Request rekeying, see <a href="https://corefork.telegram.org/api/end-to-end/pfs">rekeying process</a> <para>See <a href="https://corefork.telegram.org/constructor/decryptedMessageActionRequestKey"/></para></summary> /// <summary>Request rekeying, see <a href="https://corefork.telegram.org/api/end-to-end/pfs">rekeying process</a> <para>See <a href="https://corefork.telegram.org/constructor/decryptedMessageActionRequestKey"/></para></summary>
[TLDef(0xF3C9611B)] [TLDef(0xF3C9611B)]
public class DecryptedMessageActionRequestKey : DecryptedMessageAction public sealed partial class DecryptedMessageActionRequestKey : DecryptedMessageAction
{ {
/// <summary>Exchange ID</summary> /// <summary>Exchange ID</summary>
public long exchange_id; public long exchange_id;
@ -452,7 +452,7 @@ namespace TL
} }
/// <summary>Accept new key <para>See <a href="https://corefork.telegram.org/constructor/decryptedMessageActionAcceptKey"/></para></summary> /// <summary>Accept new key <para>See <a href="https://corefork.telegram.org/constructor/decryptedMessageActionAcceptKey"/></para></summary>
[TLDef(0x6FE1735B)] [TLDef(0x6FE1735B)]
public class DecryptedMessageActionAcceptKey : DecryptedMessageAction public sealed partial class DecryptedMessageActionAcceptKey : DecryptedMessageAction
{ {
/// <summary>Exchange ID</summary> /// <summary>Exchange ID</summary>
public long exchange_id; public long exchange_id;
@ -463,14 +463,14 @@ namespace TL
} }
/// <summary>Abort rekeying <para>See <a href="https://corefork.telegram.org/constructor/decryptedMessageActionAbortKey"/></para></summary> /// <summary>Abort rekeying <para>See <a href="https://corefork.telegram.org/constructor/decryptedMessageActionAbortKey"/></para></summary>
[TLDef(0xDD05EC6B)] [TLDef(0xDD05EC6B)]
public class DecryptedMessageActionAbortKey : DecryptedMessageAction public sealed partial class DecryptedMessageActionAbortKey : DecryptedMessageAction
{ {
/// <summary>Exchange ID</summary> /// <summary>Exchange ID</summary>
public long exchange_id; public long exchange_id;
} }
/// <summary>Commit new key, see <a href="https://corefork.telegram.org/api/end-to-end/pfs">rekeying process</a> <para>See <a href="https://corefork.telegram.org/constructor/decryptedMessageActionCommitKey"/></para></summary> /// <summary>Commit new key, see <a href="https://corefork.telegram.org/api/end-to-end/pfs">rekeying process</a> <para>See <a href="https://corefork.telegram.org/constructor/decryptedMessageActionCommitKey"/></para></summary>
[TLDef(0xEC2E0B9B)] [TLDef(0xEC2E0B9B)]
public class DecryptedMessageActionCommitKey : DecryptedMessageAction public sealed partial class DecryptedMessageActionCommitKey : DecryptedMessageAction
{ {
/// <summary>Exchange ID, see <a href="https://corefork.telegram.org/api/end-to-end/pfs">rekeying process</a></summary> /// <summary>Exchange ID, see <a href="https://corefork.telegram.org/api/end-to-end/pfs">rekeying process</a></summary>
public long exchange_id; public long exchange_id;
@ -479,11 +479,11 @@ namespace TL
} }
/// <summary>NOOP action <para>See <a href="https://corefork.telegram.org/constructor/decryptedMessageActionNoop"/></para></summary> /// <summary>NOOP action <para>See <a href="https://corefork.telegram.org/constructor/decryptedMessageActionNoop"/></para></summary>
[TLDef(0xA82FDD63)] [TLDef(0xA82FDD63)]
public class DecryptedMessageActionNoop : DecryptedMessageAction { } public sealed partial class DecryptedMessageActionNoop : DecryptedMessageAction { }
/// <summary>Sets the layer number for the contents of an encrypted message. <para>See <a href="https://corefork.telegram.org/constructor/decryptedMessageLayer"/></para></summary> /// <summary>Sets the layer number for the contents of an encrypted message. <para>See <a href="https://corefork.telegram.org/constructor/decryptedMessageLayer"/></para></summary>
[TLDef(0x1BE31789)] [TLDef(0x1BE31789)]
public class DecryptedMessageLayer : IObject public sealed partial class DecryptedMessageLayer : IObject
{ {
/// <summary>Set of random bytes to prevent content recognition in short encrypted messages.<br/>Clients are required to check that there are at least 15 random bytes included in each message. Messages with less than 15 random bytes must be ignored.<br/>Parameter moved here from <see cref="DecryptedMessage"/> in Layer 17.</summary> /// <summary>Set of random bytes to prevent content recognition in short encrypted messages.<br/>Clients are required to check that there are at least 15 random bytes included in each message. Messages with less than 15 random bytes must be ignored.<br/>Parameter moved here from <see cref="DecryptedMessage"/> in Layer 17.</summary>
public byte[] random_bytes; public byte[] random_bytes;
@ -499,7 +499,7 @@ namespace TL
/// <summary>File is currently unavailable. <para>See <a href="https://corefork.telegram.org/constructor/fileLocationUnavailable"/></para></summary> /// <summary>File is currently unavailable. <para>See <a href="https://corefork.telegram.org/constructor/fileLocationUnavailable"/></para></summary>
[TLDef(0x7C596B46)] [TLDef(0x7C596B46)]
public class FileLocationUnavailable : FileLocationBase public sealed partial class FileLocationUnavailable : FileLocationBase
{ {
/// <summary>Server volume</summary> /// <summary>Server volume</summary>
public long volume_id; public long volume_id;
@ -517,7 +517,7 @@ namespace TL
} }
/// <summary>File location. <para>See <a href="https://corefork.telegram.org/constructor/fileLocation"/></para></summary> /// <summary>File location. <para>See <a href="https://corefork.telegram.org/constructor/fileLocation"/></para></summary>
[TLDef(0x53D69076)] [TLDef(0x53D69076)]
public class FileLocation : FileLocationBase public sealed partial class FileLocation : FileLocationBase
{ {
/// <summary>Number of the data center holding the file</summary> /// <summary>Number of the data center holding the file</summary>
public int dc_id; public int dc_id;
@ -541,7 +541,7 @@ namespace TL
{ {
/// <summary>Represents an audio file <para>See <a href="https://corefork.telegram.org/constructor/documentAttributeAudio"/></para></summary> /// <summary>Represents an audio file <para>See <a href="https://corefork.telegram.org/constructor/documentAttributeAudio"/></para></summary>
[TLDef(0xDED218E0)] [TLDef(0xDED218E0)]
public class DocumentAttributeAudio : DocumentAttribute public sealed partial class DocumentAttributeAudio : DocumentAttribute
{ {
/// <summary>Duration in seconds</summary> /// <summary>Duration in seconds</summary>
public int duration; public int duration;
@ -556,7 +556,7 @@ namespace TL
{ {
/// <summary>Defines a sticker <para>See <a href="https://corefork.telegram.org/constructor/documentAttributeSticker"/></para></summary> /// <summary>Defines a sticker <para>See <a href="https://corefork.telegram.org/constructor/documentAttributeSticker"/></para></summary>
[TLDef(0x3A556302)] [TLDef(0x3A556302)]
public class DocumentAttributeSticker : DocumentAttribute public sealed partial class DocumentAttributeSticker : DocumentAttribute
{ {
/// <summary>Alternative emoji representation of sticker</summary> /// <summary>Alternative emoji representation of sticker</summary>
public string alt; public string alt;
@ -566,7 +566,7 @@ namespace TL
/// <summary>Message entity representing a <a href="https://corefork.telegram.org/api/mentions">user mention</a>: for <em>creating</em> a mention use <see cref="InputMessageEntityMentionName"/>. <para>See <a href="https://corefork.telegram.org/constructor/messageEntityMentionName"/></para></summary> /// <summary>Message entity representing a <a href="https://corefork.telegram.org/api/mentions">user mention</a>: for <em>creating</em> a mention use <see cref="InputMessageEntityMentionName"/>. <para>See <a href="https://corefork.telegram.org/constructor/messageEntityMentionName"/></para></summary>
[TLDef(0x352DCA58, inheritBefore = true)] [TLDef(0x352DCA58, inheritBefore = true)]
public class MessageEntityMentionName : MessageEntityMention public sealed partial class MessageEntityMentionName : MessageEntity
{ {
/// <summary>Identifier of the user that was mentioned</summary> /// <summary>Identifier of the user that was mentioned</summary>
public int user_id; public int user_id;
@ -574,7 +574,7 @@ namespace TL
/// <summary>Contents of an encrypted message. <para>See <a href="https://corefork.telegram.org/constructor/decryptedMessage"/></para></summary> /// <summary>Contents of an encrypted message. <para>See <a href="https://corefork.telegram.org/constructor/decryptedMessage"/></para></summary>
[TLDef(0x36B091DE)] [TLDef(0x36B091DE)]
public class DecryptedMessage : DecryptedMessageBase public sealed partial class DecryptedMessage : DecryptedMessageBase
{ {
/// <summary>Extra bits of information, use <c>flags.HasFlag(...)</c> to test for those</summary> /// <summary>Extra bits of information, use <c>flags.HasFlag(...)</c> to test for those</summary>
public Flags flags; public Flags flags;
@ -625,7 +625,7 @@ namespace TL
/// <summary>Photo attached to an encrypted message. <para>See <a href="https://corefork.telegram.org/constructor/decryptedMessageMediaPhoto"/></para></summary> /// <summary>Photo attached to an encrypted message. <para>See <a href="https://corefork.telegram.org/constructor/decryptedMessageMediaPhoto"/></para></summary>
[TLDef(0xF1FA8D78)] [TLDef(0xF1FA8D78)]
public class DecryptedMessageMediaPhoto : DecryptedMessageMedia public sealed partial class DecryptedMessageMediaPhoto : DecryptedMessageMedia
{ {
/// <summary>Content of thumbnail file (JPEGfile, quality 55, set in a square 90x90)</summary> /// <summary>Content of thumbnail file (JPEGfile, quality 55, set in a square 90x90)</summary>
public byte[] thumb; public byte[] thumb;
@ -651,7 +651,7 @@ namespace TL
} }
/// <summary>Video attached to an encrypted message. <para>See <a href="https://corefork.telegram.org/constructor/decryptedMessageMediaVideo"/></para></summary> /// <summary>Video attached to an encrypted message. <para>See <a href="https://corefork.telegram.org/constructor/decryptedMessageMediaVideo"/></para></summary>
[TLDef(0x970C8C0E)] [TLDef(0x970C8C0E)]
public class DecryptedMessageMediaVideo : DecryptedMessageMedia public sealed partial class DecryptedMessageMediaVideo : DecryptedMessageMedia
{ {
/// <summary>Content of thumbnail file (JPEG file, quality 55, set in a square 90x90)</summary> /// <summary>Content of thumbnail file (JPEG file, quality 55, set in a square 90x90)</summary>
public byte[] thumb; public byte[] thumb;
@ -683,7 +683,7 @@ namespace TL
} }
/// <summary>Document attached to a message in a secret chat. <para>See <a href="https://corefork.telegram.org/constructor/decryptedMessageMediaDocument"/></para></summary> /// <summary>Document attached to a message in a secret chat. <para>See <a href="https://corefork.telegram.org/constructor/decryptedMessageMediaDocument"/></para></summary>
[TLDef(0x7AFE8AE2)] [TLDef(0x7AFE8AE2)]
public class DecryptedMessageMediaDocument : DecryptedMessageMedia public sealed partial class DecryptedMessageMediaDocument : DecryptedMessageMedia
{ {
/// <summary>Thumbnail-file contents (JPEG-file, quality 55, set in a 90x90 square)</summary> /// <summary>Thumbnail-file contents (JPEG-file, quality 55, set in a 90x90 square)</summary>
public byte[] thumb; public byte[] thumb;
@ -711,7 +711,7 @@ namespace TL
} }
/// <summary>Venue <para>See <a href="https://corefork.telegram.org/constructor/decryptedMessageMediaVenue"/></para></summary> /// <summary>Venue <para>See <a href="https://corefork.telegram.org/constructor/decryptedMessageMediaVenue"/></para></summary>
[TLDef(0x8A0DF56F)] [TLDef(0x8A0DF56F)]
public class DecryptedMessageMediaVenue : DecryptedMessageMedia public sealed partial class DecryptedMessageMediaVenue : DecryptedMessageMedia
{ {
/// <summary>Latitude of venue</summary> /// <summary>Latitude of venue</summary>
public double lat; public double lat;
@ -728,7 +728,7 @@ namespace TL
} }
/// <summary>Webpage preview <para>See <a href="https://corefork.telegram.org/constructor/decryptedMessageMediaWebPage"/></para></summary> /// <summary>Webpage preview <para>See <a href="https://corefork.telegram.org/constructor/decryptedMessageMediaWebPage"/></para></summary>
[TLDef(0xE50511D8)] [TLDef(0xE50511D8)]
public class DecryptedMessageMediaWebPage : DecryptedMessageMedia public sealed partial class DecryptedMessageMediaWebPage : DecryptedMessageMedia
{ {
/// <summary>URL of webpage</summary> /// <summary>URL of webpage</summary>
public string url; public string url;
@ -739,11 +739,11 @@ namespace TL
{ {
/// <summary>User is uploading a round video <para>See <a href="https://corefork.telegram.org/constructor/sendMessageUploadRoundAction"/></para></summary> /// <summary>User is uploading a round video <para>See <a href="https://corefork.telegram.org/constructor/sendMessageUploadRoundAction"/></para></summary>
[TLDef(0xBB718624)] [TLDef(0xBB718624)]
public class SendMessageUploadRoundAction : SendMessageAction { } public sealed partial class SendMessageUploadRoundAction : SendMessageAction { }
/// <summary>Defines a video <para>See <a href="https://corefork.telegram.org/constructor/documentAttributeVideo"/></para></summary> /// <summary>Defines a video <para>See <a href="https://corefork.telegram.org/constructor/documentAttributeVideo"/></para></summary>
[TLDef(0x0EF02CE6)] [TLDef(0x0EF02CE6)]
public class DocumentAttributeVideo : DocumentAttribute public sealed partial class DocumentAttributeVideo : DocumentAttribute
{ {
/// <summary>Extra bits of information, use <c>flags.HasFlag(...)</c> to test for those</summary> /// <summary>Extra bits of information, use <c>flags.HasFlag(...)</c> to test for those</summary>
public Flags flags; public Flags flags;
@ -766,7 +766,7 @@ namespace TL
{ {
/// <summary>Contents of an encrypted message. <para>See <a href="https://corefork.telegram.org/constructor/decryptedMessage"/></para></summary> /// <summary>Contents of an encrypted message. <para>See <a href="https://corefork.telegram.org/constructor/decryptedMessage"/></para></summary>
[TLDef(0x91CC4674)] [TLDef(0x91CC4674)]
public class DecryptedMessage : DecryptedMessageBase public sealed partial class DecryptedMessage : DecryptedMessageBase
{ {
/// <summary>Extra bits of information, use <c>flags.HasFlag(...)</c> to test for those</summary> /// <summary>Extra bits of information, use <c>flags.HasFlag(...)</c> to test for those</summary>
public Flags flags; public Flags flags;
@ -831,7 +831,7 @@ namespace TL
{ {
/// <summary>Document attached to a message in a secret chat. <para>See <a href="https://corefork.telegram.org/constructor/decryptedMessageMediaDocument"/></para></summary> /// <summary>Document attached to a message in a secret chat. <para>See <a href="https://corefork.telegram.org/constructor/decryptedMessageMediaDocument"/></para></summary>
[TLDef(0x6ABD9782)] [TLDef(0x6ABD9782)]
public class DecryptedMessageMediaDocument : DecryptedMessageMedia public sealed partial class DecryptedMessageMediaDocument : DecryptedMessageMedia
{ {
/// <summary>Thumbnail-file contents (JPEG-file, quality 55, set in a 90x90 square)</summary> /// <summary>Thumbnail-file contents (JPEG-file, quality 55, set in a 90x90 square)</summary>
public byte[] thumb; public byte[] thumb;

View file

@ -4,7 +4,7 @@ using System.ComponentModel;
namespace TL namespace TL
{ {
public static class Layer public static partial class Layer
{ {
public const int Version = 176; // fetched 08/03/2024 11:12:00 public const int Version = 176; // fetched 08/03/2024 11:12:00
internal const int SecretChats = 144; internal const int SecretChats = 144;
@ -1325,7 +1325,7 @@ namespace TL
[typeof(UrlAuthResult)] = 0xA9D6DB1F, //urlAuthResultDefault [typeof(UrlAuthResult)] = 0xA9D6DB1F, //urlAuthResultDefault
[typeof(ChannelLocation)] = 0xBFB5AD8B, //channelLocationEmpty [typeof(ChannelLocation)] = 0xBFB5AD8B, //channelLocationEmpty
[typeof(Account_Themes)] = 0xF41EB622, //account.themesNotModified [typeof(Account_Themes)] = 0xF41EB622, //account.themesNotModified
[typeof(DialogFilter)] = 0x363293AE, //dialogFilterDefault [typeof(DialogFilterBase)] = 0x363293AE, //dialogFilterDefault
[typeof(Help_CountriesList)] = 0x93CC1F32, //help.countriesListNotModified [typeof(Help_CountriesList)] = 0x93CC1F32, //help.countriesListNotModified
[typeof(BotCommandScope)] = 0x2F6CB2AB, //botCommandScopeDefault [typeof(BotCommandScope)] = 0x2F6CB2AB, //botCommandScopeDefault
[typeof(Messages_SponsoredMessages)] = 0x1839490F, //messages.sponsoredMessagesEmpty [typeof(Messages_SponsoredMessages)] = 0x1839490F, //messages.sponsoredMessagesEmpty
@ -1340,7 +1340,6 @@ namespace TL
[typeof(ChatReactions)] = 0xEAFC32BC, //chatReactionsNone [typeof(ChatReactions)] = 0xEAFC32BC, //chatReactionsNone
[typeof(Messages_Reactions)] = 0xB06FDBDF, //messages.reactionsNotModified [typeof(Messages_Reactions)] = 0xB06FDBDF, //messages.reactionsNotModified
// from TL.Secret: // from TL.Secret:
[typeof(DialogFilterBase)] = 0x363293AE, //dialogFilterDefault
[typeof(EmojiList)] = 0x481EADFA, //emojiListNotModified [typeof(EmojiList)] = 0x481EADFA, //emojiListNotModified
[typeof(Messages_EmojiGroups)] = 0x6FB4AD87, //messages.emojiGroupsNotModified [typeof(Messages_EmojiGroups)] = 0x6FB4AD87, //messages.emojiGroupsNotModified
[typeof(Help_AppConfig)] = 0x7CDE641D, //help.appConfigNotModified [typeof(Help_AppConfig)] = 0x7CDE641D, //help.appConfigNotModified

View file

@ -16,19 +16,19 @@ namespace TL
public interface IPeerResolver { IPeerInfo UserOrChat(Peer peer); } public interface IPeerResolver { IPeerInfo UserOrChat(Peer peer); }
[AttributeUsage(AttributeTargets.Class)] [AttributeUsage(AttributeTargets.Class)]
public class TLDefAttribute(uint ctorNb) : Attribute public sealed class TLDefAttribute(uint ctorNb) : Attribute
{ {
public readonly uint CtorNb = ctorNb; public readonly uint CtorNb = ctorNb;
public bool inheritBefore; public bool inheritBefore;
} }
[AttributeUsage(AttributeTargets.Field)] [AttributeUsage(AttributeTargets.Field)]
public class IfFlagAttribute(int bit) : Attribute public sealed class IfFlagAttribute(int bit) : Attribute
{ {
public readonly int Bit = bit; public readonly int Bit = bit;
} }
public class RpcException(int code, string message, int x = -1) : WTelegram.WTException(message) public sealed class RpcException(int code, string message, int x = -1) : WTelegram.WTException(message)
{ {
public readonly int Code = code; public readonly int Code = code;
/// <summary>The value of X in the message, -1 if no variable X was found</summary> /// <summary>The value of X in the message, -1 if no variable X was found</summary>
@ -36,7 +36,7 @@ namespace TL
public override string ToString() { var str = base.ToString(); return str.Insert(str.IndexOf(':') + 1, " " + Code); } public override string ToString() { var str = base.ToString(); return str.Insert(str.IndexOf(':') + 1, " " + Code); }
} }
public class ReactorError : IObject public sealed partial class ReactorError : IObject
{ {
public Exception Exception; public Exception Exception;
} }
@ -352,7 +352,7 @@ namespace TL
public static implicit operator byte[](Int256 int256) => int256.raw; public static implicit operator byte[](Int256 int256) => int256.raw;
} }
public class UpdateAffectedMessages : Update // auto-generated for OnOwnUpdate in case of such API call result public sealed partial class UpdateAffectedMessages : Update // auto-generated for OnOwnUpdate in case of such API call result
{ {
public Messages_AffectedMessages affected; public Messages_AffectedMessages affected;
public override (long, int, int) GetMBox() => (0, affected.pts, affected.pts_count); public override (long, int, int) GetMBox() => (0, affected.pts, affected.pts_count);
@ -361,21 +361,21 @@ namespace TL
// Below TL types are commented "parsed manually" from https://github.com/telegramdesktop/tdesktop/blob/dev/Telegram/Resources/tl/mtproto.tl // Below TL types are commented "parsed manually" from https://github.com/telegramdesktop/tdesktop/blob/dev/Telegram/Resources/tl/mtproto.tl
[TLDef(0x7A19CB76)] //RSA_public_key#7a19cb76 n:bytes e:bytes = RSAPublicKey [TLDef(0x7A19CB76)] //RSA_public_key#7a19cb76 n:bytes e:bytes = RSAPublicKey
public class RSAPublicKey : IObject public sealed partial class RSAPublicKey : IObject
{ {
public byte[] n; public byte[] n;
public byte[] e; public byte[] e;
} }
[TLDef(0xF35C6D01)] //rpc_result#f35c6d01 req_msg_id:long result:Object = RpcResult [TLDef(0xF35C6D01)] //rpc_result#f35c6d01 req_msg_id:long result:Object = RpcResult
public class RpcResult : IObject public sealed partial class RpcResult : IObject
{ {
public long req_msg_id; public long req_msg_id;
public object result; public object result;
} }
[TLDef(0x5BB8E511)] //message#5bb8e511 msg_id:long seqno:int bytes:int body:Object = Message [TLDef(0x5BB8E511)] //message#5bb8e511 msg_id:long seqno:int bytes:int body:Object = Message
public class _Message(long msgId, int seqNo, IObject obj) : IObject public sealed partial class _Message(long msgId, int seqNo, IObject obj) : IObject
{ {
public long msg_id = msgId; public long msg_id = msgId;
public int seq_no = seqNo; public int seq_no = seqNo;
@ -384,10 +384,10 @@ namespace TL
} }
[TLDef(0x73F1F8DC)] //msg_container#73f1f8dc messages:vector<%Message> = MessageContainer [TLDef(0x73F1F8DC)] //msg_container#73f1f8dc messages:vector<%Message> = MessageContainer
public class MsgContainer : IObject { public _Message[] messages; } public sealed partial class MsgContainer : IObject { public _Message[] messages; }
[TLDef(0xE06046B2)] //msg_copy#e06046b2 orig_message:Message = MessageCopy [TLDef(0xE06046B2)] //msg_copy#e06046b2 orig_message:Message = MessageCopy
public class MsgCopy : IObject { public _Message orig_message; } public sealed partial class MsgCopy : IObject { public _Message orig_message; }
[TLDef(0x3072CFA1)] //gzip_packed#3072cfa1 packed_data:bytes = Object [TLDef(0x3072CFA1)] //gzip_packed#3072cfa1 packed_data:bytes = Object
public class GzipPacked : IObject { public byte[] packed_data; } public sealed partial class GzipPacked : IObject { public byte[] packed_data; }
} }

View file

@ -11,7 +11,7 @@ using System.Threading.Tasks;
namespace WTelegram namespace WTelegram
{ {
class TlsStream(Stream innerStream) : Helpers.IndirectStream(innerStream) internal sealed class TlsStream(Stream innerStream) : Helpers.IndirectStream(innerStream)
{ {
private int _tlsFrameleft; private int _tlsFrameleft;
private readonly byte[] _tlsSendHeader = [0x17, 0x03, 0x03, 0, 0]; private readonly byte[] _tlsSendHeader = [0x17, 0x03, 0x03, 0, 0];