cec7c88b6a
* Added debug logging helper that use default Debug tracer to trace filter, providers, routers and pool execution * Added debug logging for failing during handlers resolving, filters * Added new "CreateEmptyBuilder" methods for TelegramBotHost class * Addede ability to name handlers using "DisplayNameAttribute". This name is writed to descriptor's "DisplayString" property * Fixed missing summaries inside Hosting library
22 lines
841 B
C#
22 lines
841 B
C#
using Microsoft.Extensions.Logging;
|
|
using Microsoft.Extensions.Options;
|
|
using Telegrator.Configuration;
|
|
using Telegrator.MadiatorCore.Descriptors;
|
|
using Telegrator.Polling;
|
|
|
|
namespace Telegrator.Hosting.Polling
|
|
{
|
|
/// <inheritdoc/>
|
|
public class HostUpdateHandlersPool(IOptions<TelegramBotOptions> options, ILogger<HostUpdateHandlersPool> logger) : UpdateHandlersPool(options.Value, options.Value.GlobalCancellationToken)
|
|
{
|
|
private readonly ILogger<HostUpdateHandlersPool> _logger = logger;
|
|
|
|
/// <inheritdoc/>
|
|
protected override async Task ExecuteHandlerWrapper(DescribedHandlerInfo enqueuedHandler)
|
|
{
|
|
_logger.LogInformation("Handler \"{0}\" has entered execution pool", enqueuedHandler.DisplayString);
|
|
await base.ExecuteHandlerWrapper(enqueuedHandler);
|
|
}
|
|
}
|
|
}
|