mirror of
https://github.com/wiz0u/WTelegramClient.git
synced 2026-04-06 23:14:01 +00:00
fix build
This commit is contained in:
parent
866c562d81
commit
2a3c64d3d6
3 changed files with 8 additions and 9 deletions
|
|
@ -10,10 +10,8 @@ namespace WTelegram
|
|||
static class Compat
|
||||
{
|
||||
#if NETCOREAPP2_1_OR_GREATER
|
||||
internal static IPEndPoint IPEndPoint_Parse(string addr)
|
||||
=> IPEndPoint.Parse(addr);
|
||||
internal static BigInteger BigEndianInteger(byte[] value)
|
||||
=> new(value, true, true);
|
||||
internal static IPEndPoint IPEndPoint_Parse(string addr) => IPEndPoint.Parse(addr);
|
||||
internal static BigInteger BigEndianInteger(byte[] value) => new(value, true, true);
|
||||
#else
|
||||
internal static BigInteger BigEndianInteger(byte[] value)
|
||||
{
|
||||
|
|
|
|||
|
|
@ -30,9 +30,9 @@ namespace WTelegram
|
|||
using var http = new HttpClient();
|
||||
var html = await http.GetStringAsync("https://core.telegram.org/api/layers");
|
||||
currentLayer = int.Parse(Regex.Match(html, @"#layer-(\d+)").Groups[1].Value);
|
||||
await File.WriteAllBytesAsync("TL.MTProto.json", await http.GetByteArrayAsync("https://core.telegram.org/schema/mtproto-json"));
|
||||
await File.WriteAllBytesAsync("TL.Schema.json", await http.GetByteArrayAsync("https://core.telegram.org/schema/json"));
|
||||
await File.WriteAllBytesAsync("TL.Secret.json", await http.GetByteArrayAsync("https://core.telegram.org/schema/end-to-end-json"));
|
||||
File.WriteAllBytes("TL.MTProto.json", await http.GetByteArrayAsync("https://core.telegram.org/schema/mtproto-json"));
|
||||
File.WriteAllBytes("TL.Schema.json", await http.GetByteArrayAsync("https://core.telegram.org/schema/json"));
|
||||
File.WriteAllBytes("TL.Secret.json", await http.GetByteArrayAsync("https://core.telegram.org/schema/end-to-end-json"));
|
||||
#endif
|
||||
FromJson("TL.MTProto.json", "TL.MTProto.cs", @"TL.Table.cs");
|
||||
FromJson("TL.Schema.json", "TL.Schema.cs", @"TL.Table.cs");
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue