//--------------------------------------------------------------------- public Prop <T> defProp <T>(Dictionary <string, string> map_param, string key, T default_value) { PropDef prop_def = new PropDef(key, typeof(T)); mMapPropDef[prop_def.getKey()] = prop_def; Prop <T> prop = new Prop <T>(prop_def, default_value); mMapProp[prop_def.getKey()] = prop; if (map_param != null && map_param.ContainsKey(prop_def.getKey())) { string json = map_param[prop_def.getKey()]; if (!string.IsNullOrEmpty(json.Trim())) { prop.set(EbJsonHelper.deserialize <T>(json)); } } return(prop); }
//----------------------------------------------------------------------------- public string getKey() { return(mPropDef.getKey()); }
//--------------------------------------------------------------------- internal void _addPropDef(PropDef prop_def) { mMapPropDef[prop_def.getKey()] = prop_def; }