public XElement?OverrideLvl(int ilvl) { var lvlOverride = Num .Elements(W.lvlOverride) .FirstOrDefault(nlo => (int)nlo.Attribute(W.ilvl) == ilvl); if (lvlOverride != null) { return(lvlOverride.Element(W.lvl)); } return(null); }
public int?StartOverride(int ilvl) { var lvlOverride = Num .Elements(W.lvlOverride) .FirstOrDefault(nlo => (int)nlo.Attribute(W.ilvl) == ilvl); if (lvlOverride != null) { return((int?)lvlOverride .Elements(W.startOverride) .Attributes(W.val) .FirstOrDefault()); } return(null); }
public ListItemSourceSet(XDocument numXDoc, int numId) { NumId = numId; Num = numXDoc .Root .Elements(W.num) .FirstOrDefault(n => (int)n.Attribute(W.numId) == numId); AbstractNumId = (int)Num .Elements(W.abstractNumId) .Attributes(W.val) .FirstOrDefault(); AbstractNum = numXDoc .Root .Elements(W.abstractNum) .FirstOrDefault(e => (int)e.Attribute(W.abstractNumId) == AbstractNumId); }