Пример #1
0
        public void AddTag(string tag)
        {
            CLVBaseNode parent = m_componentsLibrary.GetNode(tag);

            if (parent == null)
            {
                throw new InvalidOperationException();
            }

            parent.AddChild(this);
            m_parents.Add(parent);
        }
        private CLVBaseNode GetChildNode(string[] splitPath, CLVBaseNode parent)
        {
            for (int i = 1; i < splitPath.Length; ++i)
            {
                var found = parent.AllChildren.FirstOrDefault(o => { return(o.Label.Equals(splitPath[i], StringComparison.CurrentCultureIgnoreCase)); });
                if (found == null)
                {
                    found = new CLVTagNode(splitPath[i]);
                    parent.AddChild(found);
                }

                parent = found;
            }

            return(parent);
        }
        private CLVBaseNode GetChildNode(string[] splitPath, CLVBaseNode parent)
        {
            for (int i = 1; i < splitPath.Length; ++i)
            {
                var found = parent.AllChildren.FirstOrDefault(o => { return o.Label.Equals(splitPath[i], StringComparison.CurrentCultureIgnoreCase); });
                if (found == null)
                {
                    found = new CLVTagNode(splitPath[i]);
                    //m_tagNodeCollection.Add(found);
                    parent.AddChild(found);

                    QueueRefilter();
                }

                parent = found;
            }

            return parent;
        }