Exemplo n.º 1
0
 public static Map FromHashtable(Hashtable h)
 {
     Map ret = new Map();
     foreach (object k in h.Keys)
         ret.Add(k, h[k]);
     return ret;
 }
Exemplo n.º 2
0
 public static Map Unmarshal(Hashtable map)
 {
     if (map == null)
         return null;
     Map ret = new Map();
     foreach (object k in map.Keys) {
         object x = map[k];
         if (x is Hashtable)
             ret.Add(k, Unmarshal(x as Hashtable));
         else if (x is ArrayList)
             ret.Add(k, Unmarshal(x as ArrayList));
         else
             ret.Add(k, x);
     }
     return ret;
 }