Esempio n. 1
0
        public static void DeleteTemplateMap(this GraphMap graphMap, string parentClassId, int parentClassIndex, int templateMapIndex)
        {
            ClassTemplateMap ctm = graphMap.GetClassTemplateMap(parentClassId, parentClassIndex);
            TemplateMap      tm  = ctm.templateMaps[templateMapIndex];

            foreach (RoleMap rm in tm.roleMaps)
            {
                DeleteRoleMap(graphMap, tm, rm.id);
            }

            ctm.templateMaps.RemoveAt(templateMapIndex);

            //int newIndex = 0;
            //foreach (TemplateMap tMap in ctm.templateMaps.Where(x => x.id == tm.id))
            //{
            //  tMap.index = newIndex++;
            //}

            graphMap.SetClassPath();
        }
Esempio n. 2
0
 public static void RearrangeIndexAndPath(this GraphMap graphMap)
 {
     graphMap.RearrangeTemplateMapIndex();
     graphMap.RearrangeClassMapIndex();
     graphMap.SetClassPath();
 }