【新增】新增特殊tag: unchecked。 校验器不检查带此tag的记录。

main
walon 2021-11-20 15:31:51 +08:00
parent fcc12ab0d2
commit 35082d96d5
1 changed files with 6 additions and 0 deletions

View File

@ -12,6 +12,8 @@ namespace Luban.Job.Cfg.DataVisitors
{ {
public class ValidatorVisitor : ITypeActionVisitor<DType> public class ValidatorVisitor : ITypeActionVisitor<DType>
{ {
public const string TAG_UNCHECKED = "unchecked";
private readonly Stack<object> _path = new Stack<object>(); private readonly Stack<object> _path = new Stack<object>();
public Stack<object> Path => _path; public Stack<object> Path => _path;
@ -31,6 +33,10 @@ namespace Luban.Job.Cfg.DataVisitors
foreach (Record r in records) foreach (Record r in records)
{ {
if (r.Tags != null && r.Tags.Count > 0 && r.Tags.Contains(TAG_UNCHECKED))
{
continue;
}
CurrentValidateRecord = r; CurrentValidateRecord = r;
DBean data = r.Data; DBean data = r.Data;
_path.Clear(); _path.Clear();