public CorrelationSwap(XmlNode xmlNode) : base(xmlNode) { XmlNode correlationLegNode = xmlNode.SelectSingleNode("correlationLeg"); if (correlationLegNode != null) { if (correlationLegNode.Attributes["href"] != null || correlationLegNode.Attributes["id"] != null) { if (correlationLegNode.Attributes["id"] != null) { correlationLegIDRef_ = correlationLegNode.Attributes["id"].Value; CorrelationLeg ob = new CorrelationLeg(correlationLegNode); IDManager.SetID(correlationLegIDRef_, ob); } else if (correlationLegNode.Attributes["href"] != null) { correlationLegIDRef_ = correlationLegNode.Attributes["href"].Value; } else { correlationLeg_ = new CorrelationLeg(correlationLegNode); } } else { correlationLeg_ = new CorrelationLeg(correlationLegNode); } } }
public CorrelationSwap(XmlNode xmlNode) : base(xmlNode) { XmlNodeList correlationLegNodeList = xmlNode.SelectNodes("correlationLeg"); if (correlationLegNodeList.Count > 1) { throw new Exception(); } foreach (XmlNode item in correlationLegNodeList) { if (item.Attributes["href"] != null || item.Attributes["id"] == null) { if (item.Attributes["id"] != null) { correlationLegIDRef = item.Attributes["id"].Name; CorrelationLeg ob = CorrelationLeg(); IDManager.SetID(correlationLegIDRef, ob); } else if (item.Attributes.ToString() == "href") { correlationLegIDRef = item.Attributes["href"].Name; } else { correlationLeg = new CorrelationLeg(item); } } } }
public CorrelationSwap(XmlNode xmlNode) : base(xmlNode) { XmlNodeList correlationLegNodeList = xmlNode.SelectNodes("correlationLeg"); if (correlationLegNodeList.Count > 1 ) { throw new Exception(); } foreach (XmlNode item in correlationLegNodeList) { if (item.Attributes["href"] != null || item.Attributes["id"] == null) { if (item.Attributes["id"] != null) { correlationLegIDRef = item.Attributes["id"].Name; CorrelationLeg ob = CorrelationLeg(); IDManager.SetID(correlationLegIDRef, ob); } else if (item.Attributes.ToString() == "href") { correlationLegIDRef = item.Attributes["href"].Name; } else { correlationLeg = new CorrelationLeg(item); } } } }