【调整】移除特殊tag: no,不再用于表示不导出记录
parent
35082d96d5
commit
f024ec6974
|
|
@ -10,7 +10,7 @@ using System.Collections.Generic;
|
||||||
|
|
||||||
namespace Luban.Job.Cfg.DataVisitors
|
namespace Luban.Job.Cfg.DataVisitors
|
||||||
{
|
{
|
||||||
public class ValidatorVisitor : ITypeActionVisitor<DType>
|
public class ValidatorVisitor : TypeActionVisitorAdaptor<DType>
|
||||||
{
|
{
|
||||||
public const string TAG_UNCHECKED = "unchecked";
|
public const string TAG_UNCHECKED = "unchecked";
|
||||||
|
|
||||||
|
|
@ -97,77 +97,7 @@ namespace Luban.Job.Cfg.DataVisitors
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
public void Accept(TBool type, DType x)
|
public override void Accept(TBean type, DType x)
|
||||||
{
|
|
||||||
|
|
||||||
}
|
|
||||||
|
|
||||||
public void Accept(TByte type, DType x)
|
|
||||||
{
|
|
||||||
|
|
||||||
}
|
|
||||||
|
|
||||||
public void Accept(TShort type, DType x)
|
|
||||||
{
|
|
||||||
|
|
||||||
}
|
|
||||||
|
|
||||||
public void Accept(TFshort type, DType x)
|
|
||||||
{
|
|
||||||
|
|
||||||
}
|
|
||||||
|
|
||||||
public void Accept(TInt type, DType x)
|
|
||||||
{
|
|
||||||
|
|
||||||
}
|
|
||||||
|
|
||||||
public void Accept(TFint type, DType x)
|
|
||||||
{
|
|
||||||
|
|
||||||
}
|
|
||||||
|
|
||||||
public void Accept(TLong type, DType x)
|
|
||||||
{
|
|
||||||
|
|
||||||
}
|
|
||||||
|
|
||||||
public void Accept(TFlong type, DType x)
|
|
||||||
{
|
|
||||||
|
|
||||||
}
|
|
||||||
|
|
||||||
public void Accept(TFloat type, DType x)
|
|
||||||
{
|
|
||||||
|
|
||||||
}
|
|
||||||
|
|
||||||
public void Accept(TDouble type, DType x)
|
|
||||||
{
|
|
||||||
|
|
||||||
}
|
|
||||||
|
|
||||||
public void Accept(TEnum type, DType x)
|
|
||||||
{
|
|
||||||
|
|
||||||
}
|
|
||||||
|
|
||||||
public void Accept(TString type, DType x)
|
|
||||||
{
|
|
||||||
|
|
||||||
}
|
|
||||||
|
|
||||||
public void Accept(TBytes type, DType x)
|
|
||||||
{
|
|
||||||
|
|
||||||
}
|
|
||||||
|
|
||||||
public void Accept(TText type, DType x)
|
|
||||||
{
|
|
||||||
|
|
||||||
}
|
|
||||||
|
|
||||||
public void Accept(TBean type, DType x)
|
|
||||||
{
|
{
|
||||||
var beanData = (DBean)x;
|
var beanData = (DBean)x;
|
||||||
var defFields = ((DefBean)type.Bean.AssemblyBase.GetDefType(beanData.ImplType.FullName)).HierarchyFields;// beanData.ImplType.HierarchyFields;
|
var defFields = ((DefBean)type.Bean.AssemblyBase.GetDefType(beanData.ImplType.FullName)).HierarchyFields;// beanData.ImplType.HierarchyFields;
|
||||||
|
|
@ -197,22 +127,22 @@ namespace Luban.Job.Cfg.DataVisitors
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
public void Accept(TArray type, DType x)
|
public override void Accept(TArray type, DType x)
|
||||||
{
|
{
|
||||||
AcceptListLike(type.ElementType, ((DArray)x).Datas);
|
AcceptListLike(type.ElementType, ((DArray)x).Datas);
|
||||||
}
|
}
|
||||||
|
|
||||||
public void Accept(TList type, DType x)
|
public override void Accept(TList type, DType x)
|
||||||
{
|
{
|
||||||
AcceptListLike(type.ElementType, ((DList)x).Datas);
|
AcceptListLike(type.ElementType, ((DList)x).Datas);
|
||||||
}
|
}
|
||||||
|
|
||||||
public void Accept(TSet type, DType x)
|
public override void Accept(TSet type, DType x)
|
||||||
{
|
{
|
||||||
AcceptListLike(type.ElementType, ((DSet)x).Datas);
|
AcceptListLike(type.ElementType, ((DSet)x).Datas);
|
||||||
}
|
}
|
||||||
|
|
||||||
public void Accept(TMap type, DType x)
|
public override void Accept(TMap type, DType x)
|
||||||
{
|
{
|
||||||
var keyType = type.KeyType;
|
var keyType = type.KeyType;
|
||||||
var valueType = type.ValueType;
|
var valueType = type.ValueType;
|
||||||
|
|
@ -262,25 +192,5 @@ namespace Luban.Job.Cfg.DataVisitors
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
public void Accept(TVector2 type, DType x)
|
|
||||||
{
|
|
||||||
|
|
||||||
}
|
|
||||||
|
|
||||||
public void Accept(TVector3 type, DType x)
|
|
||||||
{
|
|
||||||
|
|
||||||
}
|
|
||||||
|
|
||||||
public void Accept(TVector4 type, DType x)
|
|
||||||
{
|
|
||||||
|
|
||||||
}
|
|
||||||
|
|
||||||
public void Accept(TDateTime type, DType x)
|
|
||||||
{
|
|
||||||
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -124,11 +124,7 @@ namespace Luban.Job.Cfg.Utils
|
||||||
|
|
||||||
public static bool IsIgnoreTag(string tagName)
|
public static bool IsIgnoreTag(string tagName)
|
||||||
{
|
{
|
||||||
return !string.IsNullOrEmpty(tagName) &&
|
return tagName == "##";
|
||||||
(
|
|
||||||
tagName.Equals("no", System.StringComparison.OrdinalIgnoreCase)
|
|
||||||
|| tagName.Equals("##", System.StringComparison.Ordinal)
|
|
||||||
);
|
|
||||||
}
|
}
|
||||||
|
|
||||||
public static List<string> ParseTags(string rawTagStr)
|
public static List<string> ParseTags(string rawTagStr)
|
||||||
|
|
|
||||||
|
|
@ -41,8 +41,6 @@ namespace Luban.Job.Cfg
|
||||||
|
|
||||||
public string RootDir { get; }
|
public string RootDir { get; }
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
private readonly List<PathQuery> _pathQuerys = new List<PathQuery>(1000);
|
private readonly List<PathQuery> _pathQuerys = new List<PathQuery>(1000);
|
||||||
|
|
||||||
public void AddPathQuery(PathQuery query)
|
public void AddPathQuery(PathQuery query)
|
||||||
|
|
@ -53,7 +51,6 @@ namespace Luban.Job.Cfg
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
public List<PathQuery> GetPathQueries() => _pathQuerys;
|
public List<PathQuery> GetPathQueries() => _pathQuerys;
|
||||||
|
|
||||||
public ValidatorContext(DefAssembly ass, string rootDir)
|
public ValidatorContext(DefAssembly ass, string rootDir)
|
||||||
|
|
|
||||||
|
|
@ -0,0 +1,127 @@
|
||||||
|
using Luban.Job.Common.Types;
|
||||||
|
using System;
|
||||||
|
using System.Collections.Generic;
|
||||||
|
using System.Linq;
|
||||||
|
using System.Text;
|
||||||
|
using System.Threading.Tasks;
|
||||||
|
|
||||||
|
namespace Luban.Job.Common.TypeVisitors
|
||||||
|
{
|
||||||
|
public abstract class TypeActionVisitorAdaptor<T> : ITypeActionVisitor<T>
|
||||||
|
{
|
||||||
|
public virtual void Accept(TBool type, T x)
|
||||||
|
{
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
public virtual void Accept(TByte type, T x)
|
||||||
|
{
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
public virtual void Accept(TShort type, T x)
|
||||||
|
{
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
public virtual void Accept(TFshort type, T x)
|
||||||
|
{
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
public virtual void Accept(TInt type, T x)
|
||||||
|
{
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
public virtual void Accept(TFint type, T x)
|
||||||
|
{
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
public virtual void Accept(TLong type, T x)
|
||||||
|
{
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
public virtual void Accept(TFlong type, T x)
|
||||||
|
{
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
public virtual void Accept(TFloat type, T x)
|
||||||
|
{
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
public virtual void Accept(TDouble type, T x)
|
||||||
|
{
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
public virtual void Accept(TEnum type, T x)
|
||||||
|
{
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
public virtual void Accept(TString type, T x)
|
||||||
|
{
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
public virtual void Accept(TBytes type, T x)
|
||||||
|
{
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
public virtual void Accept(TText type, T x)
|
||||||
|
{
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
public virtual void Accept(TBean type, T x)
|
||||||
|
{
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
public virtual void Accept(TArray type, T x)
|
||||||
|
{
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
public virtual void Accept(TList type, T x)
|
||||||
|
{
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
public virtual void Accept(TSet type, T x)
|
||||||
|
{
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
public virtual void Accept(TMap type, T x)
|
||||||
|
{
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
public virtual void Accept(TVector2 type, T x)
|
||||||
|
{
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
public virtual void Accept(TVector3 type, T x)
|
||||||
|
{
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
public virtual void Accept(TVector4 type, T x)
|
||||||
|
{
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
public virtual void Accept(TDateTime type, T x)
|
||||||
|
{
|
||||||
|
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
Loading…
Reference in New Issue