Compare propertyvalue for Legal batch

seal the classes, no need to derive (nothing virtual)
This commit is contained in:
Kurt 2021-07-10 13:45:14 -07:00
parent aeb83c8269
commit 6ee552b860
4 changed files with 5 additions and 5 deletions

View file

@ -8,8 +8,8 @@ namespace PKHeX.Core
public static readonly List<IComplexFilter> FilterMods = new()
{
new ComplexFilter(PROP_LEGAL,
(pkm, cmd) => new LegalityAnalysis(pkm).Valid == cmd.Evaluator,
(info, cmd) => info.Legality.Valid == cmd.Evaluator),
(pkm, cmd) => bool.TryParse(cmd.PropertyValue, out var b) && (b == new LegalityAnalysis(pkm).Valid) == cmd.Evaluator,
(info, cmd) => bool.TryParse(cmd.PropertyValue, out var b) && (b == info.Legality.Valid) == cmd.Evaluator),
new ComplexFilter(PROP_TYPENAME,
(pkm, cmd) => (pkm.GetType().Name == cmd.PropertyValue) == cmd.Evaluator,

View file

@ -3,7 +3,7 @@
namespace PKHeX.Core
{
/// <inheritdoc cref="IComplexFilter"/>
public class ComplexFilter : IComplexFilter
public sealed class ComplexFilter : IComplexFilter
{
private readonly string Property;
private readonly Func<PKM, StringInstruction, bool> FilterPKM;

View file

@ -3,7 +3,7 @@
namespace PKHeX.Core
{
/// <inheritdoc cref="IComplexSet"/>
public class ComplexSet : IComplexSet
public sealed class ComplexSet : IComplexSet
{
public readonly string PropertyName;
public readonly Func<string, bool> IsValueCompatible = _ => true;

View file

@ -3,7 +3,7 @@
namespace PKHeX.Core
{
/// <inheritdoc cref="IComplexFilter"/>
public class MetaFilter : IComplexFilterMeta
public sealed class MetaFilter : IComplexFilterMeta
{
private readonly string Property;
private readonly Func<object, StringInstruction, bool> FilterPKM;