/// <summary> /// Parses retention information from the element /// </summary> /// <param name="xe">The retention element</param> private void processRetention(XmlElement xe) { ObjectRetention re = new ObjectRetention(); foreach (XmlNode node in xe.ChildNodes) { if (!(node is XmlElement)) { continue; } XmlElement ele = (XmlElement)node; string tagName = ele.LocalName; if ("enabled".Equals(tagName)) { re.Enabled = ele.InnerText.Equals("true"); } else if ("endAt".Equals(tagName)) { if (ele.InnerText != null && ele.InnerText.Length > 0) { re.EndAt = parseDate(ele.InnerText); } } else { throw new EsuException("Unknown Retention tag: " + tagName); } } this.Retention = re; }