public static IEnumerable<xrefPropObj> fromXml(xrefTypeObj type, XAttribute root) { var vals = root.Name.LocalName == "class" || root.Name.LocalName == "instrs" ? root.Value.Split(new char[] { ' ' }, StringSplitOptions.RemoveEmptyEntries) : XExtension.Create(root.Value); return vals.Select(v => new xrefPropObj { prop = LowUtils.toCammelCase(root.Name.LocalName), value = v, type = type }); }
public static xrefTypeObj fromXml(xrefPageObj page, XElement root, Dictionary<string, docProp> propDir) { xrefTypeObj res = new xrefTypeObj { type = LowUtils.toCammelCase(root.Name.LocalName), page = page }; res.props = root.Attributes().SelectMany(attr => xrefPropObj.fromXml(res, attr)).Where(xp => fillOrigin(xp, propDir)).ToArray(); if (res.props.Length == 0) res.props = null; return res; }