public OrderedHashSet <SubQuery> GetSubqueries() { OrderedHashSet <SubQuery> set = null; if (this.JoinCondition != null) { set = this.JoinCondition.CollectAllSubqueries(set); } if (!(this.RangeTable is TableDerived)) { return(set); } QueryExpression queryExpression = this.RangeTable.GetQueryExpression(); if (((TableDerived)this.RangeTable).view != null) { if (set == null) { set = new OrderedHashSet <SubQuery>(); } set.AddAll(((TableDerived)this.RangeTable).view.GetSubqueries()); return(set); } if (queryExpression == null) { return(OrderedHashSet <SubQuery> .Add(set, this.RangeTable.GetSubQuery())); } OrderedHashSet <SubQuery> subqueries = queryExpression.GetSubqueries(); set = OrderedHashSet <SubQuery> .AddAll(set, subqueries); SubQuery subQuery = this.RangeTable.GetSubQuery(); return(OrderedHashSet <SubQuery> .AddAll(OrderedHashSet <SubQuery> .Add(set, subQuery), subQuery.GetExtraSubqueries())); }