2025-07-24 23:19:59 +04:00
|
|
|
using Microsoft.Extensions.Logging;
|
|
|
|
|
using Microsoft.Extensions.Options;
|
|
|
|
|
using Telegrator.Configuration;
|
|
|
|
|
using Telegrator.Providers;
|
|
|
|
|
|
|
|
|
|
namespace Telegrator.Hosting.Providers
|
|
|
|
|
{
|
2025-07-26 00:01:46 +04:00
|
|
|
/// <inheritdoc/>
|
2025-07-27 14:19:40 +04:00
|
|
|
public class HostAwaitingProvider(IOptions<TelegramBotOptions> options, ILogger<HostAwaitingProvider> logger) : AwaitingProvider(options.Value)
|
2025-07-24 23:19:59 +04:00
|
|
|
{
|
2025-07-27 14:19:40 +04:00
|
|
|
private readonly ILogger<HostAwaitingProvider> _logger = logger;
|
|
|
|
|
|
|
|
|
|
/*
|
2025-07-26 00:01:46 +04:00
|
|
|
/// <inheritdoc/>
|
2025-07-24 23:19:59 +04:00
|
|
|
public override IEnumerable<DescribedHandlerInfo> GetHandlers(IUpdateRouter updateRouter, ITelegramBotClient client, Update update, CancellationToken cancellationToken = default)
|
|
|
|
|
{
|
|
|
|
|
IEnumerable<DescribedHandlerInfo> handlers = base.GetHandlers(updateRouter, client, update, cancellationToken).ToArray();
|
|
|
|
|
logger.LogInformation("Described awaiting handlers : {handlers}", string.Join(", ", handlers.Select(hndlr => hndlr.HandlerInstance.GetType().Name)));
|
|
|
|
|
return handlers;
|
|
|
|
|
}
|
2025-07-27 14:19:40 +04:00
|
|
|
*/
|
2025-07-24 23:19:59 +04:00
|
|
|
}
|
|
|
|
|
}
|