* version incremented

* Added XML summaries to new members
* Added TrySetInstance to HandlerDescriptor. Exception-free version of SetInstance method
* Changed singleton ionstance setting in HandlersProvidedr
This commit is contained in:
2025-08-01 15:11:05 +04:00
parent 92add58180
commit a5bfe7da24
8 changed files with 67 additions and 13 deletions
@@ -5,13 +5,26 @@ using Telegrator.Configuration;
namespace Telegrator.Hosting
{
/// <summary>
/// Implementation of <see cref="ITelegramBotInfo"/> that provides bot information.
/// Contains metadata about the Telegram bot including user details and service provider for wider filterring abilities
/// </summary>
/// <param name="client"></param>
/// <param name="services"></param>
/// <param name="configuration"></param>
public class HostedTelegramBotInfo(ITelegramBotClient client, IServiceProvider services, IConfigurationManager configuration) : ITelegramBotInfo
{
/// <inheritdoc/>
public User User { get; } = client.GetMe().Result;
/// <summary>
/// Provides access to services of this Hosted telegram bot
/// </summary>
public IServiceProvider Services { get; } = services;
/// <summary>
/// Provides access to configuration of this Hosted telegram bot
/// </summary>
public IConfigurationManager Configuration { get; } = configuration;
}
}
+1 -1
View File
@@ -16,7 +16,7 @@
<EnforceCodeStyleInBuild>True</EnforceCodeStyleInBuild>
<PackageLicenseFile>LICENSE</PackageLicenseFile>
<PackageReadmeFile>README.md</PackageReadmeFile>
<Version>1.0.7</Version>
<Version>1.0.8</Version>
</PropertyGroup>
<ItemGroup>