29 lines
987 B
C#
29 lines
987 B
C#
using System;
|
|
using System.Collections.Generic;
|
|
using System.Linq;
|
|
|
|
namespace FishDice.LuckyDice
|
|
{
|
|
public sealed class LuckyDiceConfigValidationContext
|
|
{
|
|
public LuckyDiceConfigValidationContext(
|
|
IReadOnlyList<IComboMatcher> matchers,
|
|
IReadOnlyList<IRollActionExecutor> actionExecutors)
|
|
{
|
|
Matchers = matchers == null ? Array.Empty<IComboMatcher>() : matchers.ToArray();
|
|
ActionExecutors = actionExecutors == null ? Array.Empty<IRollActionExecutor>() : actionExecutors.ToArray();
|
|
}
|
|
|
|
public IReadOnlyList<IComboMatcher> Matchers { get; }
|
|
|
|
public IReadOnlyList<IRollActionExecutor> ActionExecutors { get; }
|
|
|
|
public static LuckyDiceConfigValidationContext CreateDefault()
|
|
{
|
|
return new LuckyDiceConfigValidationContext(
|
|
ComboMatcherRegistry.CreateDefaultMatchers(),
|
|
RollActionExecutorRegistry.CreateDefaultExecutors());
|
|
}
|
|
}
|
|
}
|