public BondOption(XmlNode xmlNode) : base(xmlNode) { XmlNodeList strikeNodeList = xmlNode.SelectNodes("strike"); if (strikeNodeList.Count > 1 ) { throw new Exception(); } foreach (XmlNode item in strikeNodeList) { if (item.Attributes["href"] != null || item.Attributes["id"] == null) { if (item.Attributes["id"] != null) { strikeIDRef = item.Attributes["id"].Name; BondOptionStrike ob = BondOptionStrike(); IDManager.SetID(strikeIDRef, ob); } else if (item.Attributes.ToString() == "href") { strikeIDRef = item.Attributes["href"].Name; } else { strike = new BondOptionStrike(item); } } } XmlNodeList bondNodeList = xmlNode.SelectNodes("bond"); if (bondNodeList.Count > 1 ) { throw new Exception(); } foreach (XmlNode item in bondNodeList) { if (item.Attributes["href"] != null || item.Attributes["id"] == null) { if (item.Attributes["id"] != null) { bondIDRef = item.Attributes["id"].Name; Bond ob = Bond(); IDManager.SetID(bondIDRef, ob); } else if (item.Attributes.ToString() == "href") { bondIDRef = item.Attributes["href"].Name; } else { bond = new Bond(item); } } } XmlNodeList convertibleBondNodeList = xmlNode.SelectNodes("convertibleBond"); if (convertibleBondNodeList.Count > 1 ) { throw new Exception(); } foreach (XmlNode item in convertibleBondNodeList) { if (item.Attributes["href"] != null || item.Attributes["id"] == null) { if (item.Attributes["id"] != null) { convertibleBondIDRef = item.Attributes["id"].Name; ConvertibleBond ob = ConvertibleBond(); IDManager.SetID(convertibleBondIDRef, ob); } else if (item.Attributes.ToString() == "href") { convertibleBondIDRef = item.Attributes["href"].Name; } else { convertibleBond = new ConvertibleBond(item); } } } }
public BondOption(XmlNode xmlNode) : base(xmlNode) { XmlNode strikeNode = xmlNode.SelectSingleNode("strike"); if (strikeNode != null) { if (strikeNode.Attributes["href"] != null || strikeNode.Attributes["id"] != null) { if (strikeNode.Attributes["id"] != null) { strikeIDRef_ = strikeNode.Attributes["id"].Value; BondOptionStrike ob = new BondOptionStrike(strikeNode); IDManager.SetID(strikeIDRef_, ob); } else if (strikeNode.Attributes["href"] != null) { strikeIDRef_ = strikeNode.Attributes["href"].Value; } else { strike_ = new BondOptionStrike(strikeNode); } } else { strike_ = new BondOptionStrike(strikeNode); } } XmlNode bondNode = xmlNode.SelectSingleNode("bond"); if (bondNode != null) { if (bondNode.Attributes["href"] != null || bondNode.Attributes["id"] != null) { if (bondNode.Attributes["id"] != null) { bondIDRef_ = bondNode.Attributes["id"].Value; Bond ob = new Bond(bondNode); IDManager.SetID(bondIDRef_, ob); } else if (bondNode.Attributes["href"] != null) { bondIDRef_ = bondNode.Attributes["href"].Value; } else { bond_ = new Bond(bondNode); } } else { bond_ = new Bond(bondNode); } } XmlNode convertibleBondNode = xmlNode.SelectSingleNode("convertibleBond"); if (convertibleBondNode != null) { if (convertibleBondNode.Attributes["href"] != null || convertibleBondNode.Attributes["id"] != null) { if (convertibleBondNode.Attributes["id"] != null) { convertibleBondIDRef_ = convertibleBondNode.Attributes["id"].Value; ConvertibleBond ob = new ConvertibleBond(convertibleBondNode); IDManager.SetID(convertibleBondIDRef_, ob); } else if (convertibleBondNode.Attributes["href"] != null) { convertibleBondIDRef_ = convertibleBondNode.Attributes["href"].Value; } else { convertibleBond_ = new ConvertibleBond(convertibleBondNode); } } else { convertibleBond_ = new ConvertibleBond(convertibleBondNode); } } }
public BondOption(XmlNode xmlNode) : base(xmlNode) { XmlNode strikeNode = xmlNode.SelectSingleNode("strike"); if (strikeNode != null) { if (strikeNode.Attributes["href"] != null || strikeNode.Attributes["id"] != null) { if (strikeNode.Attributes["id"] != null) { strikeIDRef_ = strikeNode.Attributes["id"].Value; BondOptionStrike ob = new BondOptionStrike(strikeNode); IDManager.SetID(strikeIDRef_, ob); } else if (strikeNode.Attributes["href"] != null) { strikeIDRef_ = strikeNode.Attributes["href"].Value; } else { strike_ = new BondOptionStrike(strikeNode); } } else { strike_ = new BondOptionStrike(strikeNode); } } XmlNode bondNode = xmlNode.SelectSingleNode("bond"); if (bondNode != null) { if (bondNode.Attributes["href"] != null || bondNode.Attributes["id"] != null) { if (bondNode.Attributes["id"] != null) { bondIDRef_ = bondNode.Attributes["id"].Value; Bond ob = new Bond(bondNode); IDManager.SetID(bondIDRef_, ob); } else if (bondNode.Attributes["href"] != null) { bondIDRef_ = bondNode.Attributes["href"].Value; } else { bond_ = new Bond(bondNode); } } else { bond_ = new Bond(bondNode); } } XmlNode convertibleBondNode = xmlNode.SelectSingleNode("convertibleBond"); if (convertibleBondNode != null) { if (convertibleBondNode.Attributes["href"] != null || convertibleBondNode.Attributes["id"] != null) { if (convertibleBondNode.Attributes["id"] != null) { convertibleBondIDRef_ = convertibleBondNode.Attributes["id"].Value; ConvertibleBond ob = new ConvertibleBond(convertibleBondNode); IDManager.SetID(convertibleBondIDRef_, ob); } else if (convertibleBondNode.Attributes["href"] != null) { convertibleBondIDRef_ = convertibleBondNode.Attributes["href"].Value; } else { convertibleBond_ = new ConvertibleBond(convertibleBondNode); } } else { convertibleBond_ = new ConvertibleBond(convertibleBondNode); } } }
public BondOption(XmlNode xmlNode) : base(xmlNode) { XmlNodeList strikeNodeList = xmlNode.SelectNodes("strike"); if (strikeNodeList.Count > 1) { throw new Exception(); } foreach (XmlNode item in strikeNodeList) { if (item.Attributes["href"] != null || item.Attributes["id"] == null) { if (item.Attributes["id"] != null) { strikeIDRef = item.Attributes["id"].Name; BondOptionStrike ob = BondOptionStrike(); IDManager.SetID(strikeIDRef, ob); } else if (item.Attributes.ToString() == "href") { strikeIDRef = item.Attributes["href"].Name; } else { strike = new BondOptionStrike(item); } } } XmlNodeList bondNodeList = xmlNode.SelectNodes("bond"); if (bondNodeList.Count > 1) { throw new Exception(); } foreach (XmlNode item in bondNodeList) { if (item.Attributes["href"] != null || item.Attributes["id"] == null) { if (item.Attributes["id"] != null) { bondIDRef = item.Attributes["id"].Name; Bond ob = Bond(); IDManager.SetID(bondIDRef, ob); } else if (item.Attributes.ToString() == "href") { bondIDRef = item.Attributes["href"].Name; } else { bond = new Bond(item); } } } XmlNodeList convertibleBondNodeList = xmlNode.SelectNodes("convertibleBond"); if (convertibleBondNodeList.Count > 1) { throw new Exception(); } foreach (XmlNode item in convertibleBondNodeList) { if (item.Attributes["href"] != null || item.Attributes["id"] == null) { if (item.Attributes["id"] != null) { convertibleBondIDRef = item.Attributes["id"].Name; ConvertibleBond ob = ConvertibleBond(); IDManager.SetID(convertibleBondIDRef, ob); } else if (item.Attributes.ToString() == "href") { convertibleBondIDRef = item.Attributes["href"].Name; } else { convertibleBond = new ConvertibleBond(item); } } } }