Esempio n. 1
0
 void AddToMap(ABDefine def, Dictionary <string, ABDefine> maps)
 {
     if (!maps.ContainsKey(def.path))
     {
         maps.Add(def.path, def);
     }
     if (def.children.Count > 0)
     {
         foreach (var child in def.children)
         {
             AddToMap(child, maps);
         }
     }
 }
Esempio n. 2
0
    void SetDefine(ABDefine def, Dictionary <string, ABDefine> maps)
    {
        ABDefine src = null;

        if (maps.TryGetValue(def.path, out src))
        {
            def.expend     = src.expend;
            def.type       = src.type;
            def.persistent = src.persistent;
        }
        if (def.children != null && def.children.Count > 0)
        {
            foreach (var child in def.children)
            {
                SetDefine(child, maps);
            }
        }
    }