Beispiel #1
0
        public HeaderItems <T> GetChildlessChildren()
        {
            HeaderItems <T> childless = new HeaderItems <T>();

            AddChildlessChildren(childless);
            return(childless);
        }
Beispiel #2
0
        public void AddChild(HeaderItem <T> header)
        {
            if (null == Children)
            {
                Children = new HeaderItems <T>();
            }

            header.Parent = this;
            Children.Add(header);
        }
Beispiel #3
0
 void AddChildlessChildren(HeaderItems <T> childless)
 {
     if (!HasChildren)
     {
         childless.Add(this);
     }
     else
     {
         foreach (HeaderItem <T> item in Children)
         {
             item.AddChildlessChildren(childless);
         }
     }
 }