* 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:
@@ -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;
|
||||
}
|
||||
}
|
||||
|
||||
@@ -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>
|
||||
|
||||
Reference in New Issue
Block a user