namespace Ether { public abstract class DataBase { private DictionaryEx allDataDic = new DictionaryEx(); public bool AddData(string name, object value) { if (allDataDic.ContainsKey(name)) { return false; } allDataDic.Add(name, value); return true; } public T GetData(string name) { if (allDataDic.TryGetValue(name, out object value)) { return (T)value; } return default; } } }