* Architectural rework

This commit is contained in:
2026-03-06 23:19:24 +04:00
parent 74d778e6da
commit 866129f2ff
144 changed files with 413 additions and 368 deletions
@@ -1,16 +0,0 @@
using Telegrator.MadiatorCore;
namespace Telegrator.Hosting.Providers.Components
{
/// <summary>
/// Collection class for managing handler descriptors organized by update type for host apps.
/// Provides functionality for collecting, adding, scanning, and organizing handlers.
/// </summary>
public interface IHostHandlersCollection : IHandlersCollection
{
/// <summary>
/// List of tasks that should be completed right before building the bot
/// </summary>
public List<PreBuildingRoutine> PreBuilderRoutines { get; }
}
}
@@ -1,8 +1,7 @@
using Microsoft.Extensions.Logging;
using Microsoft.Extensions.Options;
using Telegrator.Providers;
namespace Telegrator.Hosting.Providers
namespace Telegrator.Providers
{
/// <inheritdoc/>
public class HostAwaitingProvider(IOptions<TelegratorOptions> options, ILogger<HostAwaitingProvider> logger) : AwaitingProvider(options.Value)
@@ -1,13 +1,11 @@
using Microsoft.Extensions.DependencyInjection;
using System.Reflection;
using Telegrator.Configuration;
using Telegrator.Hosting.Components;
using Telegrator.Hosting.Providers.Components;
using Telegrator.MadiatorCore;
using Telegrator.MadiatorCore.Descriptors;
using Telegrator.Providers;
using Telegrator.Core;
using Telegrator.Core.Descriptors;
using Telegrator.Hosting;
namespace Telegrator.Hosting.Providers
namespace Telegrator.Providers
{
/// <summary>
/// Pre host building task
@@ -16,7 +14,7 @@ namespace Telegrator.Hosting.Providers
public delegate void PreBuildingRoutine(ITelegramBotHostBuilder builder);
/// <inheritdoc/>
public class HostHandlersCollection(IServiceCollection hostServiceColletion, ITelegratorOptions options) : HandlersCollection(options), IHostHandlersCollection
public class HostHandlersCollection(IServiceCollection hostServiceColletion, TelegratorOptions options) : HandlersCollection(options), IHostHandlersCollection
{
private readonly IServiceCollection Services = hostServiceColletion;
@@ -1,12 +1,11 @@
using Microsoft.Extensions.DependencyInjection;
using Microsoft.Extensions.Logging;
using Microsoft.Extensions.Options;
using Telegrator.Handlers.Components;
using Telegrator.MadiatorCore;
using Telegrator.MadiatorCore.Descriptors;
using Telegrator.Providers;
using Telegrator.Core;
using Telegrator.Core.Descriptors;
using Telegrator.Core.Handlers;
namespace Telegrator.Hosting.Providers
namespace Telegrator.Providers
{
/// <inheritdoc/>
public class HostHandlersProvider : HandlersProvider