public FxSwap(XmlNode xmlNode) : base(xmlNode) { XmlNodeList nearLegNodeList = xmlNode.SelectNodes("nearLeg"); if (nearLegNodeList.Count > 1) { throw new Exception(); } foreach (XmlNode item in nearLegNodeList) { if (item.Attributes["href"] != null || item.Attributes["id"] == null) { if (item.Attributes["id"] != null) { nearLegIDRef = item.Attributes["id"].Name; FxSwapLeg ob = FxSwapLeg(); IDManager.SetID(nearLegIDRef, ob); } else if (item.Attributes.ToString() == "href") { nearLegIDRef = item.Attributes["href"].Name; } else { nearLeg = new FxSwapLeg(item); } } } XmlNodeList farLegNodeList = xmlNode.SelectNodes("farLeg"); if (farLegNodeList.Count > 1) { throw new Exception(); } foreach (XmlNode item in farLegNodeList) { if (item.Attributes["href"] != null || item.Attributes["id"] == null) { if (item.Attributes["id"] != null) { farLegIDRef = item.Attributes["id"].Name; FxSwapLeg ob = FxSwapLeg(); IDManager.SetID(farLegIDRef, ob); } else if (item.Attributes.ToString() == "href") { farLegIDRef = item.Attributes["href"].Name; } else { farLeg = new FxSwapLeg(item); } } } }
public FxSwap(XmlNode xmlNode) : base(xmlNode) { XmlNodeList nearLegNodeList = xmlNode.SelectNodes("nearLeg"); if (nearLegNodeList.Count > 1 ) { throw new Exception(); } foreach (XmlNode item in nearLegNodeList) { if (item.Attributes["href"] != null || item.Attributes["id"] == null) { if (item.Attributes["id"] != null) { nearLegIDRef = item.Attributes["id"].Name; FxSwapLeg ob = FxSwapLeg(); IDManager.SetID(nearLegIDRef, ob); } else if (item.Attributes.ToString() == "href") { nearLegIDRef = item.Attributes["href"].Name; } else { nearLeg = new FxSwapLeg(item); } } } XmlNodeList farLegNodeList = xmlNode.SelectNodes("farLeg"); if (farLegNodeList.Count > 1 ) { throw new Exception(); } foreach (XmlNode item in farLegNodeList) { if (item.Attributes["href"] != null || item.Attributes["id"] == null) { if (item.Attributes["id"] != null) { farLegIDRef = item.Attributes["id"].Name; FxSwapLeg ob = FxSwapLeg(); IDManager.SetID(farLegIDRef, ob); } else if (item.Attributes.ToString() == "href") { farLegIDRef = item.Attributes["href"].Name; } else { farLeg = new FxSwapLeg(item); } } } }
public FxSwap(XmlNode xmlNode) : base(xmlNode) { XmlNode nearLegNode = xmlNode.SelectSingleNode("nearLeg"); if (nearLegNode != null) { if (nearLegNode.Attributes["href"] != null || nearLegNode.Attributes["id"] != null) { if (nearLegNode.Attributes["id"] != null) { nearLegIDRef_ = nearLegNode.Attributes["id"].Value; FxSwapLeg ob = new FxSwapLeg(nearLegNode); IDManager.SetID(nearLegIDRef_, ob); } else if (nearLegNode.Attributes["href"] != null) { nearLegIDRef_ = nearLegNode.Attributes["href"].Value; } else { nearLeg_ = new FxSwapLeg(nearLegNode); } } else { nearLeg_ = new FxSwapLeg(nearLegNode); } } XmlNode farLegNode = xmlNode.SelectSingleNode("farLeg"); if (farLegNode != null) { if (farLegNode.Attributes["href"] != null || farLegNode.Attributes["id"] != null) { if (farLegNode.Attributes["id"] != null) { farLegIDRef_ = farLegNode.Attributes["id"].Value; FxSwapLeg ob = new FxSwapLeg(farLegNode); IDManager.SetID(farLegIDRef_, ob); } else if (farLegNode.Attributes["href"] != null) { farLegIDRef_ = farLegNode.Attributes["href"].Value; } else { farLeg_ = new FxSwapLeg(farLegNode); } } else { farLeg_ = new FxSwapLeg(farLegNode); } } }