From 21cdbf4db687073c4230237b6af5387f639a67eb Mon Sep 17 00:00:00 2001 From: ZavaruKitsu Date: Wed, 21 Sep 2022 22:49:14 +0300 Subject: [PATCH] deps: update Telegram.Bot and other libs --- Examples/AsyncFormUpdates/App.config | 372 +++++++++++++++++- .../AsyncFormUpdates/AsyncFormUpdates.csproj | 18 +- Examples/AsyncFormUpdates/packages.config | 8 - Examples/EFCoreBot/EFCoreBot.csproj | 4 +- .../TelegramBotBase.Extensions.Images.csproj | 3 +- ...xtensions.Serializer.Database.MSSQL.csproj | 2 +- TelegramBotBase/Base/DataResult.cs | 12 +- TelegramBotBase/TelegramBotBase.csproj | 2 +- 8 files changed, 389 insertions(+), 32 deletions(-) delete mode 100644 Examples/AsyncFormUpdates/packages.config diff --git a/Examples/AsyncFormUpdates/App.config b/Examples/AsyncFormUpdates/App.config index 436e44f..8ffc026 100644 --- a/Examples/AsyncFormUpdates/App.config +++ b/Examples/AsyncFormUpdates/App.config @@ -1,13 +1,377 @@ - - + + - - + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/Examples/AsyncFormUpdates/AsyncFormUpdates.csproj b/Examples/AsyncFormUpdates/AsyncFormUpdates.csproj index 5c48fb5..579f062 100644 --- a/Examples/AsyncFormUpdates/AsyncFormUpdates.csproj +++ b/Examples/AsyncFormUpdates/AsyncFormUpdates.csproj @@ -34,17 +34,9 @@ 4 - - ..\..\packages\Newtonsoft.Json.13.0.1\lib\net45\Newtonsoft.Json.dll - + - - ..\..\packages\System.Runtime.CompilerServices.Unsafe.4.5.3\lib\net461\System.Runtime.CompilerServices.Unsafe.dll - - - ..\..\packages\System.Threading.Tasks.Extensions.4.5.4\lib\net461\System.Threading.Tasks.Extensions.dll - @@ -64,7 +56,6 @@ - @@ -72,5 +63,12 @@ TelegramBotBase + + + + + + + \ No newline at end of file diff --git a/Examples/AsyncFormUpdates/packages.config b/Examples/AsyncFormUpdates/packages.config deleted file mode 100644 index e9dd729..0000000 --- a/Examples/AsyncFormUpdates/packages.config +++ /dev/null @@ -1,8 +0,0 @@ - - - - - - - - \ No newline at end of file diff --git a/Examples/EFCoreBot/EFCoreBot.csproj b/Examples/EFCoreBot/EFCoreBot.csproj index 324c2a9..7421594 100644 --- a/Examples/EFCoreBot/EFCoreBot.csproj +++ b/Examples/EFCoreBot/EFCoreBot.csproj @@ -8,8 +8,8 @@ - - + + diff --git a/TelegramBotBase.Extensions.Images/TelegramBotBase.Extensions.Images.csproj b/TelegramBotBase.Extensions.Images/TelegramBotBase.Extensions.Images.csproj index 4b974c8..0b84053 100644 --- a/TelegramBotBase.Extensions.Images/TelegramBotBase.Extensions.Images.csproj +++ b/TelegramBotBase.Extensions.Images/TelegramBotBase.Extensions.Images.csproj @@ -15,11 +15,10 @@ runtime; build; native; contentfiles; analyzers; buildtransitive - - \ No newline at end of file + diff --git a/TelegramBotBase.Extensions.Serializer.Database.MSSQL/TelegramBotBase.Extensions.Serializer.Database.MSSQL.csproj b/TelegramBotBase.Extensions.Serializer.Database.MSSQL/TelegramBotBase.Extensions.Serializer.Database.MSSQL.csproj index f86ee86..a0d40f7 100644 --- a/TelegramBotBase.Extensions.Serializer.Database.MSSQL/TelegramBotBase.Extensions.Serializer.Database.MSSQL.csproj +++ b/TelegramBotBase.Extensions.Serializer.Database.MSSQL/TelegramBotBase.Extensions.Serializer.Database.MSSQL.csproj @@ -16,7 +16,7 @@ - + all runtime; build; native; contentfiles; analyzers; buildtransitive diff --git a/TelegramBotBase/Base/DataResult.cs b/TelegramBotBase/Base/DataResult.cs index fab04bd..fb87df0 100644 --- a/TelegramBotBase/Base/DataResult.cs +++ b/TelegramBotBase/Base/DataResult.cs @@ -108,7 +108,8 @@ namespace TelegramBotBase.Base public async Task DownloadDocument() { - var encryptedContent = new System.IO.MemoryStream(this.Document.FileSize.Value); + var encryptedContent = new System.IO.MemoryStream(); + encryptedContent.SetLength(this.Document.FileSize.Value); var file = await Device.Client.TelegramClient.GetInfoAndDownloadFileAsync(this.Document.FileId, encryptedContent); return new InputOnlineFile(encryptedContent, this.Document.FileName); @@ -167,7 +168,8 @@ namespace TelegramBotBase.Base public async Task DownloadVideo() { - var encryptedContent = new System.IO.MemoryStream(this.Video.FileSize.Value); + var encryptedContent = new System.IO.MemoryStream(); + encryptedContent.SetLength(this.Video.FileSize.Value); var file = await Device.Client.TelegramClient.GetInfoAndDownloadFileAsync(this.Video.FileId, encryptedContent); return new InputOnlineFile(encryptedContent, ""); @@ -184,7 +186,8 @@ namespace TelegramBotBase.Base public async Task DownloadAudio() { - var encryptedContent = new System.IO.MemoryStream(this.Audio.FileSize.Value); + var encryptedContent = new System.IO.MemoryStream(); + encryptedContent.SetLength(this.Audio.FileSize.Value); var file = await Device.Client.TelegramClient.GetInfoAndDownloadFileAsync(this.Audio.FileId, encryptedContent); return new InputOnlineFile(encryptedContent, ""); @@ -202,7 +205,8 @@ namespace TelegramBotBase.Base public async Task DownloadPhoto(int index) { var photo = this.Photos[index]; - var encryptedContent = new System.IO.MemoryStream(photo.FileSize.Value); + var encryptedContent = new System.IO.MemoryStream(); + encryptedContent.SetLength(photo.FileSize.Value); var file = await Device.Client.TelegramClient.GetInfoAndDownloadFileAsync(photo.FileId, encryptedContent); return new InputOnlineFile(encryptedContent, ""); diff --git a/TelegramBotBase/TelegramBotBase.csproj b/TelegramBotBase/TelegramBotBase.csproj index 05c9802..a5b9666 100644 --- a/TelegramBotBase/TelegramBotBase.csproj +++ b/TelegramBotBase/TelegramBotBase.csproj @@ -58,7 +58,7 @@ - +