public override IPara Initial(string con, string v) { IntPara ip = (IntPara)IntPara.pool.BorrowObject(); ip.name = EMPTY_NAME; ip.value = int.Parse(v); return(ip); }
static ParaUtil() { map = new MyDictionary <string, IPara>(); map["string"] = new StringPara(); map["int"] = new IntPara(); map["long"] = new LongPara(); map["bool"] = new BoolPara(); map["float"] = new FloatPara(); map["double"] = new DoublePara(); }
public virtual IPara GetValue(string key) { if (!map.ContainsKey(key)) { if (!number) { map[key] = new StringPara(key, "null"); } else { map[key] = new IntPara(key, 0); } } return(map[key]); }