public IRIFDataScope RegisterCell(IRIFDataScope cell) { ScopeTreeNode scopeTreeNode = default(ScopeTreeNode); if (!this.m_scopes.TryGetValue(cell, out scopeTreeNode)) { if (this.HasScope(this.m_activeRowScopes) && this.HasScope(this.m_activeColumnScopes)) { ScopeTreeNode first = this.m_activeRowScopes.First; ScopeTreeNode first2 = this.m_activeColumnScopes.First; if (!this.TryGetCanonicalCellScope(first, first2, out scopeTreeNode)) { scopeTreeNode = new IntersectScopeNode(cell, first, first2); this.AddCanonicalCellScope(first, first2, scopeTreeNode); } ((IntersectScopeNode)scopeTreeNode).AddCell(cell); } else { scopeTreeNode = new SubScopeNode(cell, this.m_activeScopes.First); } } this.AddScope(scopeTreeNode, cell); this.m_activeRowScopes = this.m_activeRowScopes.Add(null); this.m_activeColumnScopes = this.m_activeColumnScopes.Add(null); return(scopeTreeNode.Scope); }
private IntersectScopeNode GetIntersectScopeNodeOrAssert(IRIFDataScope scope) { ScopeTreeNode scopeNodeOrAssert = this.GetScopeNodeOrAssert(scope); IntersectScopeNode intersectScopeNode = scopeNodeOrAssert as IntersectScopeNode; Global.Tracer.Assert(intersectScopeNode != null, "Specified scope was not an IntersectScopeNode "); return(intersectScopeNode); }
public IRIFDataScope GetParentColumnScopeForIntersection(IRIFDataScope intersectScope) { IntersectScopeNode intersectScopeNodeOrAssert = this.GetIntersectScopeNodeOrAssert(intersectScope); return(intersectScopeNodeOrAssert.ParentColumnScope.Scope); }