IsInheritedFrom() public method

Determines if the specified table is an ancestor of the this table object
public IsInheritedFrom ( Table table ) : bool
table Table
return bool
Esempio n. 1
0
        public IEnumerable <Relation> GetRelationsWhereChild(Table table, bool fullHierarchy)
        {
            var retval = new List <Relation>();

            foreach (Relation relation in this.Relations)
            {
                var childTable = relation.ChildTableRef.Object as Table;
                if (childTable == table)
                {
                    retval.Add(relation);
                }
                else if (fullHierarchy && table.IsInheritedFrom(childTable))
                {
                    retval.Add(relation);
                }
            }
            return(retval);
        }
Esempio n. 2
0
 public IEnumerable<Relation> GetRelationsWhereChild(Table table, bool fullHierarchy)
 {
     var retval = new List<Relation>();
     foreach (Relation relation in this.Relations)
     {
         var childTable = relation.ChildTableRef.Object as Table;
         if (childTable == table)
             retval.Add(relation);
         else if (fullHierarchy && table.IsInheritedFrom(childTable))
             retval.Add(relation);
     }
     return retval;
 }