internal override void Parse(XmlNode node) { // RankLog Header ModelID = Guid.Parse(node.Attributes["id"].Value); CorrId = Guid.Parse(node.Attributes["corr_id"].Value); InstanceId = node.Attributes["instance_id"].Value; // RankLog Elements Elements = new List <RankLogElement>(); foreach (XmlNode childNode in node.ChildNodes) { RankLogElement element = CreateChildElement(childNode); element.Parse(childNode); Elements.Add(element); } }
internal override void Parse(XmlNode node) { Type = node.Attributes["type"].Value; StageId = Guid.Parse(node.Attributes["id"].Value); Rank = double.Parse(node.Attributes["rank"].Value); RankAfter = double.Parse(node.Attributes["rank_after"].Value); StageRankInterval = node.Attributes["stage_rank_interval"].Value; // now parse features and stage model Features = new List <RankLogStageFeature>(); foreach (XmlNode childNode in node.ChildNodes) { RankLogElement element = CreateChildElement(childNode); element.Parse(childNode); if (element is RankLogStageModel stageModel) { StageModel = stageModel; } else if (element is RankLogStageFeature stageFeature) { // everything else should be a RankLogStageRankFeature Features.Add(stageFeature); } else { throw new NotImplementedException(); } } // Give each feature a chance to do cleanup/adjustments once all features are in place foreach (var feature in Features) { feature.AllFeaturesComplete(); } }