feat(core): Рефакторинг ShortcodesService, реализован паттерн стратегия

This commit is contained in:
Mikhail Kuznetsov
2026-05-14 16:31:03 +10:00
parent e5900be547
commit f7a74d315a
20 changed files with 843 additions and 1008 deletions

View File

@@ -7,6 +7,7 @@ using PARR.Core.Services.MatchingStatusService;
using PARR.Core.Services.NextRunServices;
using PARR.Core.Services.NextRunServices.Subservices;
using PARR.Core.Services.Shortcodes;
using PARR.Core.Services.Shortcodes.Handlers;
using PARR.Core.Services.TaskServices.Handlers;
using PARR.Core.Services.TaskServices.Handlers.Factory;
using PARR.Core.Services.TaskServices.Implementations;
@@ -71,7 +72,21 @@ namespace PARR.Core
#region Services
services.AddTransient<IShortcodesService, ShortcodesService>();
#region Shortсodes
services.AddScoped<IShortcodeHandler, ConstantsShortcodeHandler>();
services.AddScoped<IShortcodeHandler, StandardShortcodeHandler>();
services.AddScoped<IShortcodeHandler, IndexShortcodeHandler>();
services.AddScoped<IShortcodeHandler, GroupedFieldShortcodeHandler>();
services.AddScoped<IShortcodeHandler, MaxShortcodeHandler>();
services.AddScoped<IShortcodeHandler, RelShortcodeHandler>();
services.AddScoped<IShortcodeHandler, LettersShortcodeHandler>();
services.AddScoped<IShortcodeHandler, RelationshipsShortcodeHandler>();
services.AddScoped<IShortcodeHandler, FieldShortcodeHandler>();
services.AddScoped<IShortcodesService, ShortcodesService>();
#endregion
services.AddTransient<IMatchingStatusService, MatchingStatusService>();
//services.AddScoped<IUserService, UserService>();