Exemplo n.º 1
0
        public object Clone()
        {
            SRTree tmp = new SRTree();

            if (this.LeftList != null)
            {
                tmp.LeftList = this.LeftList.Clone() as ArrayList;
            }
            if (this.RightList != null)
            {
                tmp.RightList = this.RightList.Clone() as ArrayList;
            }

            return(tmp);
        }
Exemplo n.º 2
0
        /// <summary>
        /// Merge the right lists of passed tree and current tree.
        /// </summary>
        /// <param name="tree"></param>
        public void Merge(SRTree tree)
        {
            if (tree == null)
            {
                tree = new SRTree();
            }

            if (tree.RightList == null)
            {
                tree.RightList = new ArrayList();
            }

            if (this.RightList != null)
            {
                IEnumerator en = this.RightList.GetEnumerator();
                while (en.MoveNext())
                {
                    if (!tree.RightList.Contains(en.Current))
                    {
                        tree.RightList.Add(en.Current);
                    }
                }
            }
        }
Exemplo n.º 3
0
        public object Clone()
        {
            SRTree tmp = new SRTree();
            
            if (this.LeftList != null)
                tmp.LeftList = this.LeftList.Clone() as ArrayList;
            if (this.RightList != null)
                tmp.RightList = this.RightList.Clone() as ArrayList;

            return tmp;
        }
Exemplo n.º 4
0
 public QueryContext(Topologies.Local.LocalCacheBase cache)
 {
     _cache = cache;
     _tree = new SRTree();
 }
Exemplo n.º 5
0
        /// <summary>
        /// Merge the right lists of passed tree and current tree.
        /// </summary>
        /// <param name="tree"></param>
        public void Merge(SRTree tree)
        {
            if (tree == null)
                tree = new SRTree();
            
            if (tree.RightList == null)
                tree.RightList = new ArrayList();

            if (this.RightList != null)
            {
                IEnumerator en = this.RightList.GetEnumerator();
                while (en.MoveNext())
                {
                    if (!tree.RightList.Contains(en.Current))
                        tree.RightList.Add(en.Current);
                }

            }
        }