public void RegisterTextParser(Type type, ParseTextDelegate del) { if (textParserDic.ContainsKey(type)) { Debug.LogWarning(string.Format("Duplicate CustomDbClass : {0}", type)); } textParserDic.Add(type, del); }
public string ParseText(Type type, object value) { ParseTextDelegate del = null; if (textParserDic.TryGetValue(type, out del)) { return(del(value)); } return(null); }