コード例 #1
0
        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);
        }
コード例 #2
0
 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();
 }
コード例 #3
0
 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]);
 }