2017-05-28 04:17:53 +00:00
|
|
|
|
namespace PKHeX.Core
|
|
|
|
|
{
|
2017-10-24 06:12:58 +00:00
|
|
|
|
/// <summary>
|
|
|
|
|
/// Result of a Legality Check
|
|
|
|
|
/// </summary>
|
2017-05-28 04:17:53 +00:00
|
|
|
|
public class CheckResult
|
|
|
|
|
{
|
2018-09-06 04:27:52 +00:00
|
|
|
|
public Severity Judgement { get; }
|
|
|
|
|
public CheckIdentifier Identifier { get; }
|
|
|
|
|
public string Comment { get; internal set; }
|
|
|
|
|
|
2017-05-28 04:17:53 +00:00
|
|
|
|
public bool Valid => Judgement >= Severity.Fishy;
|
2017-12-12 00:01:24 +00:00
|
|
|
|
public string Rating => Judgement.Description();
|
2017-05-28 04:17:53 +00:00
|
|
|
|
|
2018-09-06 04:27:52 +00:00
|
|
|
|
internal CheckResult(CheckIdentifier i)
|
|
|
|
|
{
|
|
|
|
|
Judgement = Severity.Valid;
|
|
|
|
|
Comment = LegalityCheckStrings.L_AValid;
|
|
|
|
|
Identifier = i;
|
|
|
|
|
}
|
2018-08-03 03:11:42 +00:00
|
|
|
|
|
2017-05-28 04:17:53 +00:00
|
|
|
|
internal CheckResult(Severity s, string c, CheckIdentifier i)
|
|
|
|
|
{
|
|
|
|
|
Judgement = s;
|
|
|
|
|
Comment = c;
|
|
|
|
|
Identifier = i;
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
}
|