private void AddValueLabels(List<object> content, Variable variable) { List<XElement> list = new List<XElement>(); foreach (var item in variable.ValueLabels) { list.Add(new XElement("valueLabel", new XAttribute("name", item.Key), new XAttribute("value", item.Value))); } XElement ele = new XElement("valueLabels", list); content.Add(ele); }
private Variable ParseVariable(DataBlock dataBlock, Entity e) { // lee las variables if (JumptToDataSet(dataBlock) == false) return null; Variable v = new Variable(e); v.Name = dataBlock.eatShortString(); v.Declaration = dataBlock.eatShortString(); v.Filter = dataBlock.eatShortString(); v.Range = dataBlock.eatShortString(); v.Type = dataBlock.eatShortString(); v.ValuesLabelsRaw = dataBlock.eatShortString(); v.Label = dataBlock.eatShortString(); v.Group = dataBlock.eatShortString(); v.ParseDeclaration(); v.ParseValueLabels(); v.ParseMissingAndPrecision(); return v; }