public YieldCurveMethod(XmlNode xmlNode) { XmlNode settlementRateSourceNode = xmlNode.SelectSingleNode("settlementRateSource"); if (settlementRateSourceNode != null) { if (settlementRateSourceNode.Attributes["href"] != null || settlementRateSourceNode.Attributes["id"] != null) { if (settlementRateSourceNode.Attributes["id"] != null) { settlementRateSourceIDRef_ = settlementRateSourceNode.Attributes["id"].Value; SettlementRateSource ob = new SettlementRateSource(settlementRateSourceNode); IDManager.SetID(settlementRateSourceIDRef_, ob); } else if (settlementRateSourceNode.Attributes["href"] != null) { settlementRateSourceIDRef_ = settlementRateSourceNode.Attributes["href"].Value; } else { settlementRateSource_ = new SettlementRateSource(settlementRateSourceNode); } } else { settlementRateSource_ = new SettlementRateSource(settlementRateSourceNode); } } XmlNode quotationRateTypeNode = xmlNode.SelectSingleNode("quotationRateType"); if (quotationRateTypeNode != null) { if (quotationRateTypeNode.Attributes["href"] != null || quotationRateTypeNode.Attributes["id"] != null) { if (quotationRateTypeNode.Attributes["id"] != null) { quotationRateTypeIDRef_ = quotationRateTypeNode.Attributes["id"].Value; QuotationRateTypeEnum ob = new QuotationRateTypeEnum(quotationRateTypeNode); IDManager.SetID(quotationRateTypeIDRef_, ob); } else if (quotationRateTypeNode.Attributes["href"] != null) { quotationRateTypeIDRef_ = quotationRateTypeNode.Attributes["href"].Value; } else { quotationRateType_ = new QuotationRateTypeEnum(quotationRateTypeNode); } } else { quotationRateType_ = new QuotationRateTypeEnum(quotationRateTypeNode); } } }
public YieldCurveMethod(XmlNode xmlNode) { XmlNodeList settlementRateSourceNodeList = xmlNode.SelectNodes("settlementRateSource"); if (settlementRateSourceNodeList.Count > 1) { throw new Exception(); } foreach (XmlNode item in settlementRateSourceNodeList) { if (item.Attributes["href"] != null || item.Attributes["id"] == null) { if (item.Attributes["id"] != null) { settlementRateSourceIDRef = item.Attributes["id"].Name; SettlementRateSource ob = SettlementRateSource(); IDManager.SetID(settlementRateSourceIDRef, ob); } else if (item.Attributes.ToString() == "href") { settlementRateSourceIDRef = item.Attributes["href"].Name; } else { settlementRateSource = new SettlementRateSource(item); } } } XmlNodeList quotationRateTypeNodeList = xmlNode.SelectNodes("quotationRateType"); if (quotationRateTypeNodeList.Count > 1) { throw new Exception(); } foreach (XmlNode item in quotationRateTypeNodeList) { if (item.Attributes["href"] != null || item.Attributes["id"] == null) { if (item.Attributes["id"] != null) { quotationRateTypeIDRef = item.Attributes["id"].Name; QuotationRateTypeEnum ob = QuotationRateTypeEnum(); IDManager.SetID(quotationRateTypeIDRef, ob); } else if (item.Attributes.ToString() == "href") { quotationRateTypeIDRef = item.Attributes["href"].Name; } else { quotationRateType = new QuotationRateTypeEnum(item); } } } }
public YieldCurveMethod(XmlNode xmlNode) { XmlNodeList settlementRateSourceNodeList = xmlNode.SelectNodes("settlementRateSource"); if (settlementRateSourceNodeList.Count > 1 ) { throw new Exception(); } foreach (XmlNode item in settlementRateSourceNodeList) { if (item.Attributes["href"] != null || item.Attributes["id"] == null) { if (item.Attributes["id"] != null) { settlementRateSourceIDRef = item.Attributes["id"].Name; SettlementRateSource ob = SettlementRateSource(); IDManager.SetID(settlementRateSourceIDRef, ob); } else if (item.Attributes.ToString() == "href") { settlementRateSourceIDRef = item.Attributes["href"].Name; } else { settlementRateSource = new SettlementRateSource(item); } } } XmlNodeList quotationRateTypeNodeList = xmlNode.SelectNodes("quotationRateType"); if (quotationRateTypeNodeList.Count > 1 ) { throw new Exception(); } foreach (XmlNode item in quotationRateTypeNodeList) { if (item.Attributes["href"] != null || item.Attributes["id"] == null) { if (item.Attributes["id"] != null) { quotationRateTypeIDRef = item.Attributes["id"].Name; QuotationRateTypeEnum ob = QuotationRateTypeEnum(); IDManager.SetID(quotationRateTypeIDRef, ob); } else if (item.Attributes.ToString() == "href") { quotationRateTypeIDRef = item.Attributes["href"].Name; } else { quotationRateType = new QuotationRateTypeEnum(item); } } } }