예제 #1
0
 public HierarchicalLevelLoop AddLevel(string code, HierarchicalLevelLoop parent)
 {
     if (parent != Root && !Root.Descendants().Contains(parent))
     {
         throw new InvalidOperationException("Specified loop is not part of hierarchy");
     }
     return(parent.AddLevel(++_currentId, code));
 }
 public HierarchicalLevelLoop AddLevel(int id, string code)
 {
     var l = new HierarchicalLevelLoop(_segmentFactory, _showHasChildElement);
     if(_showHasChildElement && !_childElementAdded )
         addChildElement();
     AddLoop(l);
     l.SetHeader(id, code);
     return l;
 }
예제 #3
0
        public HierarchicalLevelLoop AddLevel(int id, string code)
        {
            var l = new HierarchicalLevelLoop(_segmentFactory, _showHasChildElement);

            if (_showHasChildElement && !_childElementAdded)
            {
                addChildElement();
            }
            AddLoop(l);
            l.SetHeader(id, code);
            return(l);
        }
 public HierarchicalLevelLoop AddLevel(string code, HierarchicalLevelLoop parent)
 {
     if (parent != Root && !Root.Descendants().Contains(parent))
         throw new InvalidOperationException("Specified loop is not part of hierarchy");
     return parent.AddLevel(++_currentId, code);
 }
 private HierarchicalLevelLoopWrapper(string code, ISegmentFactory factory, bool hasChild)
 {
     Root = new HierarchicalLevelLoop(factory, hasChild);
     _printHasChildElement = hasChild;
     Root.SetHeader(_currentId, code);
 }
예제 #6
0
 private HierarchicalLevelLoopWrapper(string code, ISegmentFactory factory, bool hasChild)
 {
     Root = new HierarchicalLevelLoop(factory, hasChild);
     _printHasChildElement = hasChild;
     Root.SetHeader(_currentId, code);
 }