예제 #1
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();
 }
예제 #2
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]);
 }