internal Model_6B3_ChildRelationList(ItemModel owner, RowX item) : base(owner, item)
 {
     StoreX_ChildRelation = item.GetRoot().Get <Relation_StoreX_ChildRelation>();
 }
Example #2
0
 bool TryGetChildRelations(Item item, out IList <Relation> relations, Relation_Store_ChildRelation stoCRels, Relation_StoreX_ChildRelation stoXCRels)
 {
     if (item.GetOwner().IsExternal)
     {
         if (stoXCRels.TryGetChildren(item, out IList <Relation> txRelations))
         {
             relations = new List <Relation>(txRelations);
             return(true);
         }
         relations = null;
         return(false);
     }
     return(stoCRels.TryGetChildren(item.GetOwner(), out relations));
 }
 internal Model_662_ChildRelationList(Model_654_Table owner, TableX item) : base(owner, item)
 {
     _relation_StoreX_ChildRelation = item.GetRoot().Get <Relation_StoreX_ChildRelation>();
 }
Example #4
0
 void FindDependents(Item target2, List <Item> hitList, Relation_Store_ChildRelation stoCRels, Relation_StoreX_ChildRelation stoXCRels)
 {
     hitList.Add(target2);
     if (target2 is Store store)
     {
         var items = store.GetItems();
         foreach (var item in items)
         {
             FindDependents(item, hitList, stoCRels, stoXCRels);
         }
     }
     if (TryGetChildRelations(target2, out IList <Relation> relations, stoCRels, stoXCRels))
     {
         foreach (var rel in relations)
         {
             if (rel.IsRequired && rel.TryGetChildren(target2, out List <Item> children))
             {
                 foreach (var child in children)
                 {
                     FindDependents(child, hitList, stoCRels, stoXCRels);
                 }
             }
         }
     }
 }
Example #5
0
 private void InitializeLocalReferences(Root root)
 {
     _relation_StoreX_ChildRelation  = root.Get <Relation_StoreX_ChildRelation>();
     _relation_StoreX_ParentRelation = root.Get <Relation_StoreX_ParentRelation>();
 }