mirror of
https://github.com/kwsch/PKHeX
synced 2024-12-23 19:03:11 +00:00
fc754b346b
[Language Reference](https://docs.microsoft.com/en-us/dotnet/csharp/language-reference/proposals/csharp-10.0/file-scoped-namespaces) Updates all the files, one less level of indentation. Some small changes were made to API surfaces, renaming `PKM pkm` -> `PKM pk`, and `LegalityAnalysis.pkm` -> `LegalityAnalysis.Entity`
26 lines
1.2 KiB
C#
26 lines
1.2 KiB
C#
namespace PKHeX.Core;
|
|
|
|
/// <summary>
|
|
/// Verification that provides new <see cref="CheckResult"/> values for a <see cref="LegalityAnalysis"/>.
|
|
/// </summary>
|
|
public abstract class Verifier
|
|
{
|
|
/// <summary>
|
|
/// <see cref="CheckResult"/> category.
|
|
/// </summary>
|
|
protected abstract CheckIdentifier Identifier { get; }
|
|
|
|
/// <summary>
|
|
/// Processes the <see cref="data"/> and adds any relevant <see cref="CheckResult"/> values to the <see cref="LegalityAnalysis.Parse"/>.
|
|
/// </summary>
|
|
/// <param name="data">Analysis data to process</param>
|
|
public abstract void Verify(LegalityAnalysis data);
|
|
|
|
protected CheckResult GetInvalid(string msg) => Get(msg, Severity.Invalid);
|
|
protected CheckResult GetValid(string msg) => Get(msg, Severity.Valid);
|
|
protected CheckResult Get(string msg, Severity s) => new(s, msg, Identifier);
|
|
|
|
protected static CheckResult GetInvalid(string msg, CheckIdentifier c) => Get(msg, Severity.Invalid, c);
|
|
protected static CheckResult GetValid(string msg, CheckIdentifier c) => Get(msg, Severity.Valid, c);
|
|
protected static CheckResult Get(string msg, Severity s, CheckIdentifier c) => new(s, msg, c);
|
|
}
|