Esempio n. 1
0
        public List <Level> Collect(int numberingId, int level)
        {
            if (_numbering == null)
            {
                return(new List <Level>());
            }

            var num = _numbering
                      .Elements <NumberingInstance>()
                      .FirstOrDefault(x => x.NumberID?.Value == numberingId);

            if (num == null)
            {
                return(new List <Level>());
            }

            var cursor = new Cursor {
                anumID = num.AbstractNumId?.Val, level = level
            };

            AddFromAnum(cursor);
            AddFromOverride(level, num, cursor);

            return(cursor.results);
        }
Esempio n. 2
0
 private Level GetFromAnum(int anumId, int level) =>
 _numbering
 .Elements <AbstractNum>()
 .Single(x => x.AbstractNumberId == anumId)
 .Elements <Level>()
 .Single(x => x.LevelIndex == level);
Esempio n. 3
0
 private NumberingInstance FindNumberingInstancFromId(int numberingId)
 {
     return(_numbering
            .Elements <NumberingInstance>()
            .Single(x => x.NumberID.Value == numberingId));
 }