public VarianceLeg(XmlNode xmlNode) : base(xmlNode) { XmlNodeList amountNodeList = xmlNode.SelectNodes("amount"); if (amountNodeList.Count > 1) { throw new Exception(); } foreach (XmlNode item in amountNodeList) { if (item.Attributes["href"] != null || item.Attributes["id"] == null) { if (item.Attributes["id"] != null) { amountIDRef = item.Attributes["id"].Name; VarianceAmount ob = VarianceAmount(); IDManager.SetID(amountIDRef, ob); } else if (item.Attributes.ToString() == "href") { amountIDRef = item.Attributes["href"].Name; } else { amount = new VarianceAmount(item); } } } }
public VarianceLeg(XmlNode xmlNode) : base(xmlNode) { XmlNodeList amountNodeList = xmlNode.SelectNodes("amount"); if (amountNodeList.Count > 1 ) { throw new Exception(); } foreach (XmlNode item in amountNodeList) { if (item.Attributes["href"] != null || item.Attributes["id"] == null) { if (item.Attributes["id"] != null) { amountIDRef = item.Attributes["id"].Name; VarianceAmount ob = VarianceAmount(); IDManager.SetID(amountIDRef, ob); } else if (item.Attributes.ToString() == "href") { amountIDRef = item.Attributes["href"].Name; } else { amount = new VarianceAmount(item); } } } }
public VarianceLeg(XmlNode xmlNode) : base(xmlNode) { XmlNode amountNode = xmlNode.SelectSingleNode("amount"); if (amountNode != null) { if (amountNode.Attributes["href"] != null || amountNode.Attributes["id"] != null) { if (amountNode.Attributes["id"] != null) { amountIDRef_ = amountNode.Attributes["id"].Value; VarianceAmount ob = new VarianceAmount(amountNode); IDManager.SetID(amountIDRef_, ob); } else if (amountNode.Attributes["href"] != null) { amountIDRef_ = amountNode.Attributes["href"].Value; } else { amount_ = new VarianceAmount(amountNode); } } else { amount_ = new VarianceAmount(amountNode); } } }