Продолжение рефакторинга (вынесение WPF в отдельный проект)
This commit is contained in:
+25
-2
@@ -1,11 +1,14 @@
|
||||
using System.Collections.Generic;
|
||||
using Microsoft.Extensions.DependencyInjection;
|
||||
using Pf2e.Scrapper.Processors;
|
||||
using Pf2e.Database.Model.Enum;
|
||||
using Pf2e.Scrapper.Processors;
|
||||
|
||||
namespace Pf2e.Scrapper.Importers.Implementations.Aonprd.Helpers;
|
||||
|
||||
internal static class AonprdProcessorInputExtension
|
||||
/// <summary>
|
||||
/// Класс-расширение для <see cref="ProcessorInput"/>.
|
||||
/// </summary>
|
||||
public static class AonprdProcessorInputExtension
|
||||
{
|
||||
/// <summary>
|
||||
/// Обработать строку, содержащую информацию о количестве действий.
|
||||
@@ -121,8 +124,12 @@ internal static class AonprdProcessorInputExtension
|
||||
public bool TwoRounds { get; set; }
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Разрешитель перечисления <see cref="SourceCategory"/>.
|
||||
/// </summary>
|
||||
public class SourceCategorySolver : EnumSolver<SourceCategory>
|
||||
{
|
||||
/// <inheritdoc />
|
||||
public override Dictionary<string, SourceCategory> Data { get; } =
|
||||
new()
|
||||
{
|
||||
@@ -136,8 +143,12 @@ internal static class AonprdProcessorInputExtension
|
||||
};
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Разрешитель перечисления <see cref="VisionEnum"/>.
|
||||
/// </summary>
|
||||
public class VisionEnumSolver : EnumSolver<VisionEnum>
|
||||
{
|
||||
/// <inheritdoc />
|
||||
public override Dictionary<string, VisionEnum> Data { get; } =
|
||||
new()
|
||||
{
|
||||
@@ -146,8 +157,12 @@ internal static class AonprdProcessorInputExtension
|
||||
};
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Разрешитель перечисления <see cref="AttributeValues"/>.
|
||||
/// </summary>
|
||||
public class AttributeValuesSolver : EnumSolver<AttributeValues>
|
||||
{
|
||||
/// <inheritdoc />
|
||||
public override Dictionary<string, AttributeValues> Data { get; } =
|
||||
new()
|
||||
{
|
||||
@@ -157,8 +172,12 @@ internal static class AonprdProcessorInputExtension
|
||||
};
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Разрешитель перечисления <see cref="ActionEnum"/>.
|
||||
/// </summary>
|
||||
public class ActionEnumSolver : EnumSolver<ActionEnum>
|
||||
{
|
||||
/// <inheritdoc />
|
||||
public override Dictionary<string, ActionEnum> Data { get; } =
|
||||
new()
|
||||
{
|
||||
@@ -187,6 +206,10 @@ internal static class AonprdProcessorInputExtension
|
||||
};
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Регистрирует службы разрешителей перечислений в контейнере служб.
|
||||
/// </summary>
|
||||
/// <param name="serviceCollection">Коллекция служб.</param>
|
||||
public static void RegisterServices(IServiceCollection serviceCollection)
|
||||
{
|
||||
serviceCollection.AddTransient<IEnumSolver, SourceCategorySolver>();
|
||||
|
||||
Reference in New Issue
Block a user