예제 #1
0
 // Test for the  presence of an optional table in the supplied sub node tree
 public bool IsTablePresent(BTree <Node> subNodeTree, NID nid)
 {
     return(subNodeTree != null && NDB.LookupSubNode(subNodeTree, nid) != null);
 }
예제 #2
0
        // Second form takes a node ID for a node in the supplied sub node tree
        public IEnumerable <T> ReadTable <T>(FileStream fs, BTree <Node> subNodeTree, NID nid, PropertyGetters <T> g,
                                             Action <T, UInt32> idGetter = null, Action <T, Property> storeProp = null) where T : new()
        {
            BTree <Node> childSubNodeTree;
            var          rn = ndb.LookupSubNodeAndReadItsSubNodeBtree(fs, subNodeTree, nid, out childSubNodeTree);

            if (rn == null)
            {
                throw new XstException("Node block does not exist");
            }

            return(ReadTableInternal <T>(fs, childSubNodeTree, rn.DataBid, g, idGetter, storeProp));
        }