public override void ReadFrom(XElement xE) { base.ReadFrom(xE); CriterionId = null; Min = null; Max = null; foreach (var xItem in xE.Elements()) { var localName = xItem.Name.LocalName; if (localName == "criterionId") { CriterionId = long.Parse(xItem.Value); } else if (localName == "min") { Min = new StatsEstimate(); Min.ReadFrom(xItem); } else if (localName == "max") { Max = new StatsEstimate(); Max.ReadFrom(xItem); } } }
public virtual void ReadFrom(XElement xE) { Platform = null; MinEstimate = null; MaxEstimate = null; foreach (var xItem in xE.Elements()) { var localName = xItem.Name.LocalName; if (localName == "platform") { Platform = new Platform(); Platform.ReadFrom(xItem); } else if (localName == "minEstimate") { MinEstimate = new StatsEstimate(); MinEstimate.ReadFrom(xItem); } else if (localName == "maxEstimate") { MaxEstimate = new StatsEstimate(); MaxEstimate.ReadFrom(xItem); } } }