using System.Collections.Generic; namespace GameEditor.Core.DataConfig { public class DataSheet { public string name; public List fields; public List> lines; public DataSheet() { fields = new List(); lines = new List>(); } public bool Verify(DataSheet sheet,out string msg) { msg = null; if(!VerifyField()) { return false; } return true; } private bool VerifyField() { Dictionary fieldDic = new Dictionary(); foreach(DataField df in fields) { if(fieldDic.ContainsKey(df.name)) { return false; } else { fieldDic.Add(df.name, true); } } return true; } } }