TelegramBotBase 7.2.0
Prefix Reserveddotnet add package TelegramBotBase --version 7.2.0
NuGet\Install-Package TelegramBotBase -Version 7.2.0
<PackageReference Include="TelegramBotBase" Version="7.2.0" />
<PackageVersion Include="TelegramBotBase" Version="7.2.0" />
<PackageReference Include="TelegramBotBase" />
paket add TelegramBotBase --version 7.2.0
#r "nuget: TelegramBotBase, 7.2.0"
#:package TelegramBotBase@7.2.0
#addin nuget:?package=TelegramBotBase&version=7.2.0
#tool nuget:?package=TelegramBotBase&version=7.2.0
Dependency Injection Refactoring
- New
FormDiEscortclass (IAsyncDisposable) that bundles theIServiceScopeandIFormFactoryaccompanying each form. (TelegramBotBase/DependencyInjection/FormDiEscort.cs) - Scoped service resolution:
ServiceProviderFormFactorynow creates a dedicated async service scope per form instead of passing the rootIServiceProvideraround. The scope is disposed together with the form. (TelegramBotBase/Factories/ServiceProviderFormFactory.cs) - Extension methods reworked:
SetServiceProvider/GetServiceProviderwere replaced bySetDiEscort/GetDiEscort; DI-basedNavigateTooverloads now create new forms through the attachedFormFactory. (TelegramBotBase/DependencyInjection/Extensions.cs) FormBaseis nowIAsyncDisposable(previouslyIDisposable).DisposeAsyncdisposes the DI escort, andOnClosednow disposes the form automatically (also fixes an inverted null check in the event handler invocation). (TelegramBotBase/Base/FormBase.cs)- Typed factory results:
CreateForm<T>()now returnsTinstead ofFormBaseinDefaultFormFactory,LambdaFormFactory, andServiceProviderFormFactory.
Framework Fixes
ButtonGrid.Hiddennow performs aCleanup()when a modal is opened, so control state is rendered correctly after returning. (TelegramBotBase/Controls/Hybrid/ButtonGrid.cs)PromptDialogCompletedEventArgsnow derives fromEventArgs. (TelegramBotBase/Args/PromptDialogCompletedEventArgs.cs)- Source generators: fixed
chatIdparameter ordering inTelegramDeviceExtensionGeneratorand a loop bug inXmlDocumentationLoader; refreshed the bundledTelegram.Bot.xmldocumentation file. (TelegramBotBase.SourceGenerators/)
Examples
FileWatcher enhancements
- Added a
MessageBatcherthat collects file event messages within a configurable time window and sends them as a single batch, reducing notification spam. (Examples/FileWatcher/MessageBatcher.cs) - Config now supports
ServerName,BatchIntervalSeconds, and a%servername%placeholder in message templates; config loading is more robust and creates a default config file if none exists. (Examples/FileWatcher/Model/Config.cs,Examples/FileWatcher/Program.cs) - Unified the Created/Changed/Renamed handlers into a single file event handler using the batcher.
New ModalDialogNavigation example
Added a new example project (Examples/ModalDialogNavigation/) with a Start menu and four forms demonstrating dialog and navigation patterns:
- Version1: modal
PromptDialogwithout controls. - Version2:
ButtonGridcontrol + modal prompt dialog, preserving control state. - Version3:
ButtonGrid+ non-modal prompt dialog (NavigateTo), demonstrating disposal and re-navigation from the dialog context. - Version4: demonstrates the illegal use of
NavigateTofrom a modal dialog context and handles the expectedInvalidOperationException.
Test project
TelegramBotBase.Testnow has an interactive console menu (open bot in browser / quit) and improvements toTestForm2(callback data validation, back-to-menu button).
Dependency & Documentation Updates
- Bumped
Microsoft.SourceLink.GitHub,Microsoft.Data.SqlClient(6.1.4 → 7.0.1),Npgsql(8.0.8 → 9.0.5),IronSoftware.System.Drawing, andSystem.Drawing.Commonacross extension projects. - Dropped
netcoreapp3.1target from the PostgreSql serializer extension. - README: added notes on API key security,
UploadBotCommands()usage,SimpleJSONStateMachinelimitations, a thread-safety warning for.UseThreadPool(), an IronSoftware licensing note, a link to the new ModalDialogNavigation example, and removed a duplicated section.
⚠️ Potential Breaking Changes
FormBasechanged fromIDisposabletoIAsyncDisposable(Dispose()→DisposeAsync()).SetServiceProvider/GetServiceProviderextension methods were replaced bySetDiEscort/GetDiEscort.IFormFactory.CreateForm<T>()return type changed fromFormBasetoT.
| Product | Versions Compatible and additional computed target framework versions. |
|---|---|
| .NET | net5.0 was computed. net5.0-windows was computed. net6.0 was computed. net6.0-android was computed. net6.0-ios was computed. net6.0-maccatalyst was computed. net6.0-macos was computed. net6.0-tvos was computed. net6.0-windows was computed. net7.0 is compatible. net7.0-android was computed. net7.0-ios was computed. net7.0-maccatalyst was computed. net7.0-macos was computed. net7.0-tvos was computed. net7.0-windows was computed. net8.0 is compatible. net8.0-android was computed. net8.0-browser was computed. net8.0-ios was computed. net8.0-maccatalyst was computed. net8.0-macos was computed. net8.0-tvos was computed. net8.0-windows was computed. net9.0 is compatible. net9.0-android was computed. net9.0-browser was computed. net9.0-ios was computed. net9.0-maccatalyst was computed. net9.0-macos was computed. net9.0-tvos was computed. net9.0-windows was computed. net10.0 is compatible. net10.0-android was computed. net10.0-browser was computed. net10.0-ios was computed. net10.0-maccatalyst was computed. net10.0-macos was computed. net10.0-tvos was computed. net10.0-windows was computed. |
| .NET Core | netcoreapp3.1 is compatible. |
-
.NETCoreApp 3.1
- Microsoft.Extensions.DependencyInjection.Abstractions (>= 10.0.10)
- Telegram.Bot (>= 22.10.2.1)
-
net10.0
- Microsoft.Extensions.DependencyInjection.Abstractions (>= 10.0.10)
- Telegram.Bot (>= 22.10.2.1)
-
net7.0
- Microsoft.Extensions.DependencyInjection.Abstractions (>= 10.0.10)
- Telegram.Bot (>= 22.10.2.1)
-
net8.0
- Microsoft.Extensions.DependencyInjection.Abstractions (>= 10.0.10)
- Telegram.Bot (>= 22.10.2.1)
-
net9.0
- Microsoft.Extensions.DependencyInjection.Abstractions (>= 10.0.10)
- Telegram.Bot (>= 22.10.2.1)
NuGet packages (6)
Showing the top 5 NuGet packages that depend on TelegramBotBase:
| Package | Downloads |
|---|---|
|
TelegramBotBase.Extensions.Images
This is an extension for sending Bitmap/Images via TelegramBotBase. |
|
|
TelegramBotBase.Extensions.Serializer.Database.PostgreSql
Serializer for postgre sql |
|
|
TelegramBotBase.Extensions.Serializer.Database.MSSQL
base version to replace the Newtonsoft.Json serializer in the main package |
|
|
TelegramBotBase.Extensions.ActionManager
This is a action manager extension to use with the C# TelegramBotBase library. |
|
|
TelegramBotBase.Extensions.Images.IronSoftware
This is an extension for sending Bitmap/Images platform independent by using IronSoftware's drawing library via TelegramBotBase. |
GitHub repositories
This package is not used by any popular GitHub repositories.
| Version | Downloads | Last Updated |
|---|---|---|
| 7.2.0 | 103 | 8/4/2026 |
| 7.2.0-preview.3 | 57 | 7/26/2026 |
| 7.2.0-preview.2 | 80 | 4/13/2026 |
| 7.2.0-preview.1 | 71 | 4/8/2026 |
| 7.1.1 | 683 | 3/17/2026 |
| 7.1.0 | 409 | 1/8/2026 |
| 7.1.0-preview.1 | 244 | 11/16/2025 |
| 7.0.0 | 2,082 | 6/28/2025 |
| 7.0.0-preview.14 | 275 | 6/16/2025 |
| 7.0.0-preview.13 | 170 | 6/7/2025 |
| 7.0.0-preview.12 | 154 | 5/17/2025 |
| 7.0.0-preview.11 | 228 | 4/20/2025 |
| 7.0.0-preview.10 | 558 | 3/26/2025 |
| 7.0.0-preview.9 | 520 | 3/25/2025 |
| 7.0.0-preview.8 | 538 | 3/25/2025 |
| 7.0.0-preview.7 | 339 | 3/23/2025 |
| 7.0.0-preview.6 | 114 | 3/22/2025 |
| 7.0.0-preview.5 | 238 | 2/18/2025 |
| 6.6.3 | 495 | 6/7/2025 |
| 6.6.2 | 810 | 3/25/2025 |
- Dependency update. Removing .Net Framework target and replacing with .Net Standard 2.0