public FeeLeg(XmlNode xmlNode) : base(xmlNode) { XmlNode initialPaymentNode = xmlNode.SelectSingleNode("initialPayment"); if (initialPaymentNode != null) { if (initialPaymentNode.Attributes["href"] != null || initialPaymentNode.Attributes["id"] != null) { if (initialPaymentNode.Attributes["id"] != null) { initialPaymentIDRef_ = initialPaymentNode.Attributes["id"].Value; InitialPayment ob = new InitialPayment(initialPaymentNode); IDManager.SetID(initialPaymentIDRef_, ob); } else if (initialPaymentNode.Attributes["href"] != null) { initialPaymentIDRef_ = initialPaymentNode.Attributes["href"].Value; } else { initialPayment_ = new InitialPayment(initialPaymentNode); } } else { initialPayment_ = new InitialPayment(initialPaymentNode); } } XmlNodeList singlePaymentNodeList = xmlNode.SelectNodes("singlePayment"); if (singlePaymentNodeList != null) { this.singlePayment_ = new List<SinglePayment>(); foreach (XmlNode item in singlePaymentNodeList) { if (item.Attributes["href"] != null || item.Attributes["id"] != null) { if (item.Attributes["id"] != null) { singlePaymentIDRef_ = item.Attributes["id"].Value; singlePayment_.Add(new SinglePayment(item)); IDManager.SetID(singlePaymentIDRef_, singlePayment_[singlePayment_.Count - 1 ]); } else if (item.Attributes["href"] != null) { singlePaymentIDRef_ = item.Attributes["href"].Value; } else { singlePayment_.Add(new SinglePayment(item)); } } else { singlePayment_.Add(new SinglePayment(item)); } } } XmlNode periodicPaymentNode = xmlNode.SelectSingleNode("periodicPayment"); if (periodicPaymentNode != null) { if (periodicPaymentNode.Attributes["href"] != null || periodicPaymentNode.Attributes["id"] != null) { if (periodicPaymentNode.Attributes["id"] != null) { periodicPaymentIDRef_ = periodicPaymentNode.Attributes["id"].Value; PeriodicPayment ob = new PeriodicPayment(periodicPaymentNode); IDManager.SetID(periodicPaymentIDRef_, ob); } else if (periodicPaymentNode.Attributes["href"] != null) { periodicPaymentIDRef_ = periodicPaymentNode.Attributes["href"].Value; } else { periodicPayment_ = new PeriodicPayment(periodicPaymentNode); } } else { periodicPayment_ = new PeriodicPayment(periodicPaymentNode); } } XmlNode marketFixedRateNode = xmlNode.SelectSingleNode("marketFixedRate"); if (marketFixedRateNode != null) { if (marketFixedRateNode.Attributes["href"] != null || marketFixedRateNode.Attributes["id"] != null) { if (marketFixedRateNode.Attributes["id"] != null) { marketFixedRateIDRef_ = marketFixedRateNode.Attributes["id"].Value; XsdTypeDecimal ob = new XsdTypeDecimal(marketFixedRateNode); IDManager.SetID(marketFixedRateIDRef_, ob); } else if (marketFixedRateNode.Attributes["href"] != null) { marketFixedRateIDRef_ = marketFixedRateNode.Attributes["href"].Value; } else { marketFixedRate_ = new XsdTypeDecimal(marketFixedRateNode); } } else { marketFixedRate_ = new XsdTypeDecimal(marketFixedRateNode); } } XmlNode paymentDelayNode = xmlNode.SelectSingleNode("paymentDelay"); if (paymentDelayNode != null) { if (paymentDelayNode.Attributes["href"] != null || paymentDelayNode.Attributes["id"] != null) { if (paymentDelayNode.Attributes["id"] != null) { paymentDelayIDRef_ = paymentDelayNode.Attributes["id"].Value; XsdTypeBoolean ob = new XsdTypeBoolean(paymentDelayNode); IDManager.SetID(paymentDelayIDRef_, ob); } else if (paymentDelayNode.Attributes["href"] != null) { paymentDelayIDRef_ = paymentDelayNode.Attributes["href"].Value; } else { paymentDelay_ = new XsdTypeBoolean(paymentDelayNode); } } else { paymentDelay_ = new XsdTypeBoolean(paymentDelayNode); } } XmlNode initialPointsNode = xmlNode.SelectSingleNode("initialPoints"); if (initialPointsNode != null) { if (initialPointsNode.Attributes["href"] != null || initialPointsNode.Attributes["id"] != null) { if (initialPointsNode.Attributes["id"] != null) { initialPointsIDRef_ = initialPointsNode.Attributes["id"].Value; XsdTypeDecimal ob = new XsdTypeDecimal(initialPointsNode); IDManager.SetID(initialPointsIDRef_, ob); } else if (initialPointsNode.Attributes["href"] != null) { initialPointsIDRef_ = initialPointsNode.Attributes["href"].Value; } else { initialPoints_ = new XsdTypeDecimal(initialPointsNode); } } else { initialPoints_ = new XsdTypeDecimal(initialPointsNode); } } XmlNode quotationStyleNode = xmlNode.SelectSingleNode("quotationStyle"); if (quotationStyleNode != null) { if (quotationStyleNode.Attributes["href"] != null || quotationStyleNode.Attributes["id"] != null) { if (quotationStyleNode.Attributes["id"] != null) { quotationStyleIDRef_ = quotationStyleNode.Attributes["id"].Value; QuotationStyleEnum ob = new QuotationStyleEnum(quotationStyleNode); IDManager.SetID(quotationStyleIDRef_, ob); } else if (quotationStyleNode.Attributes["href"] != null) { quotationStyleIDRef_ = quotationStyleNode.Attributes["href"].Value; } else { quotationStyle_ = new QuotationStyleEnum(quotationStyleNode); } } else { quotationStyle_ = new QuotationStyleEnum(quotationStyleNode); } } }
public FeeLeg(XmlNode xmlNode) : base(xmlNode) { XmlNode initialPaymentNode = xmlNode.SelectSingleNode("initialPayment"); if (initialPaymentNode != null) { if (initialPaymentNode.Attributes["href"] != null || initialPaymentNode.Attributes["id"] != null) { if (initialPaymentNode.Attributes["id"] != null) { initialPaymentIDRef_ = initialPaymentNode.Attributes["id"].Value; InitialPayment ob = new InitialPayment(initialPaymentNode); IDManager.SetID(initialPaymentIDRef_, ob); } else if (initialPaymentNode.Attributes["href"] != null) { initialPaymentIDRef_ = initialPaymentNode.Attributes["href"].Value; } else { initialPayment_ = new InitialPayment(initialPaymentNode); } } else { initialPayment_ = new InitialPayment(initialPaymentNode); } } XmlNodeList singlePaymentNodeList = xmlNode.SelectNodes("singlePayment"); if (singlePaymentNodeList != null) { this.singlePayment_ = new List <SinglePayment>(); foreach (XmlNode item in singlePaymentNodeList) { if (item.Attributes["href"] != null || item.Attributes["id"] != null) { if (item.Attributes["id"] != null) { singlePaymentIDRef_ = item.Attributes["id"].Value; singlePayment_.Add(new SinglePayment(item)); IDManager.SetID(singlePaymentIDRef_, singlePayment_[singlePayment_.Count - 1]); } else if (item.Attributes["href"] != null) { singlePaymentIDRef_ = item.Attributes["href"].Value; } else { singlePayment_.Add(new SinglePayment(item)); } } else { singlePayment_.Add(new SinglePayment(item)); } } } XmlNode periodicPaymentNode = xmlNode.SelectSingleNode("periodicPayment"); if (periodicPaymentNode != null) { if (periodicPaymentNode.Attributes["href"] != null || periodicPaymentNode.Attributes["id"] != null) { if (periodicPaymentNode.Attributes["id"] != null) { periodicPaymentIDRef_ = periodicPaymentNode.Attributes["id"].Value; PeriodicPayment ob = new PeriodicPayment(periodicPaymentNode); IDManager.SetID(periodicPaymentIDRef_, ob); } else if (periodicPaymentNode.Attributes["href"] != null) { periodicPaymentIDRef_ = periodicPaymentNode.Attributes["href"].Value; } else { periodicPayment_ = new PeriodicPayment(periodicPaymentNode); } } else { periodicPayment_ = new PeriodicPayment(periodicPaymentNode); } } XmlNode marketFixedRateNode = xmlNode.SelectSingleNode("marketFixedRate"); if (marketFixedRateNode != null) { if (marketFixedRateNode.Attributes["href"] != null || marketFixedRateNode.Attributes["id"] != null) { if (marketFixedRateNode.Attributes["id"] != null) { marketFixedRateIDRef_ = marketFixedRateNode.Attributes["id"].Value; XsdTypeDecimal ob = new XsdTypeDecimal(marketFixedRateNode); IDManager.SetID(marketFixedRateIDRef_, ob); } else if (marketFixedRateNode.Attributes["href"] != null) { marketFixedRateIDRef_ = marketFixedRateNode.Attributes["href"].Value; } else { marketFixedRate_ = new XsdTypeDecimal(marketFixedRateNode); } } else { marketFixedRate_ = new XsdTypeDecimal(marketFixedRateNode); } } XmlNode paymentDelayNode = xmlNode.SelectSingleNode("paymentDelay"); if (paymentDelayNode != null) { if (paymentDelayNode.Attributes["href"] != null || paymentDelayNode.Attributes["id"] != null) { if (paymentDelayNode.Attributes["id"] != null) { paymentDelayIDRef_ = paymentDelayNode.Attributes["id"].Value; XsdTypeBoolean ob = new XsdTypeBoolean(paymentDelayNode); IDManager.SetID(paymentDelayIDRef_, ob); } else if (paymentDelayNode.Attributes["href"] != null) { paymentDelayIDRef_ = paymentDelayNode.Attributes["href"].Value; } else { paymentDelay_ = new XsdTypeBoolean(paymentDelayNode); } } else { paymentDelay_ = new XsdTypeBoolean(paymentDelayNode); } } XmlNode initialPointsNode = xmlNode.SelectSingleNode("initialPoints"); if (initialPointsNode != null) { if (initialPointsNode.Attributes["href"] != null || initialPointsNode.Attributes["id"] != null) { if (initialPointsNode.Attributes["id"] != null) { initialPointsIDRef_ = initialPointsNode.Attributes["id"].Value; XsdTypeDecimal ob = new XsdTypeDecimal(initialPointsNode); IDManager.SetID(initialPointsIDRef_, ob); } else if (initialPointsNode.Attributes["href"] != null) { initialPointsIDRef_ = initialPointsNode.Attributes["href"].Value; } else { initialPoints_ = new XsdTypeDecimal(initialPointsNode); } } else { initialPoints_ = new XsdTypeDecimal(initialPointsNode); } } XmlNode quotationStyleNode = xmlNode.SelectSingleNode("quotationStyle"); if (quotationStyleNode != null) { if (quotationStyleNode.Attributes["href"] != null || quotationStyleNode.Attributes["id"] != null) { if (quotationStyleNode.Attributes["id"] != null) { quotationStyleIDRef_ = quotationStyleNode.Attributes["id"].Value; QuotationStyleEnum ob = new QuotationStyleEnum(quotationStyleNode); IDManager.SetID(quotationStyleIDRef_, ob); } else if (quotationStyleNode.Attributes["href"] != null) { quotationStyleIDRef_ = quotationStyleNode.Attributes["href"].Value; } else { quotationStyle_ = new QuotationStyleEnum(quotationStyleNode); } } else { quotationStyle_ = new QuotationStyleEnum(quotationStyleNode); } } }
public FeeLeg(XmlNode xmlNode) : base(xmlNode) { XmlNodeList initialPaymentNodeList = xmlNode.SelectNodes("initialPayment"); if (initialPaymentNodeList.Count > 1) { throw new Exception(); } foreach (XmlNode item in initialPaymentNodeList) { if (item.Attributes["href"] != null || item.Attributes["id"] == null) { if (item.Attributes["id"] != null) { initialPaymentIDRef = item.Attributes["id"].Name; InitialPayment ob = InitialPayment(); IDManager.SetID(initialPaymentIDRef, ob); } else if (item.Attributes.ToString() == "href") { initialPaymentIDRef = item.Attributes["href"].Name; } else { initialPayment = new InitialPayment(item); } } } XmlNodeList singlePaymentNodeList = xmlNode.SelectNodes("singlePayment"); foreach (XmlNode item in singlePaymentNodeList) { if (item.Attributes["href"] != null || item.Attributes["id"] == null) { if (item.Attributes["id"] != null) { singlePaymentIDRef = item.Attributes["id"].Name; List <SinglePayment> ob = new List <SinglePayment>(); ob.Add(new SinglePayment(item)); IDManager.SetID(singlePaymentIDRef, ob); } else if (item.Attributes.ToString() == "href") { singlePaymentIDRef = item.Attributes["href"].Name; } else { singlePayment.Add(new SinglePayment(item)); } } } XmlNodeList periodicPaymentNodeList = xmlNode.SelectNodes("periodicPayment"); if (periodicPaymentNodeList.Count > 1) { throw new Exception(); } foreach (XmlNode item in periodicPaymentNodeList) { if (item.Attributes["href"] != null || item.Attributes["id"] == null) { if (item.Attributes["id"] != null) { periodicPaymentIDRef = item.Attributes["id"].Name; PeriodicPayment ob = PeriodicPayment(); IDManager.SetID(periodicPaymentIDRef, ob); } else if (item.Attributes.ToString() == "href") { periodicPaymentIDRef = item.Attributes["href"].Name; } else { periodicPayment = new PeriodicPayment(item); } } } XmlNodeList marketFixedRateNodeList = xmlNode.SelectNodes("marketFixedRate"); if (marketFixedRateNodeList.Count > 1) { throw new Exception(); } foreach (XmlNode item in marketFixedRateNodeList) { if (item.Attributes["href"] != null || item.Attributes["id"] == null) { if (item.Attributes["id"] != null) { marketFixedRateIDRef = item.Attributes["id"].Name; XsdTypeDecimal ob = XsdTypeDecimal(); IDManager.SetID(marketFixedRateIDRef, ob); } else if (item.Attributes.ToString() == "href") { marketFixedRateIDRef = item.Attributes["href"].Name; } else { marketFixedRate = new XsdTypeDecimal(item); } } } XmlNodeList paymentDelayNodeList = xmlNode.SelectNodes("paymentDelay"); if (paymentDelayNodeList.Count > 1) { throw new Exception(); } foreach (XmlNode item in paymentDelayNodeList) { if (item.Attributes["href"] != null || item.Attributes["id"] == null) { if (item.Attributes["id"] != null) { paymentDelayIDRef = item.Attributes["id"].Name; XsdTypeBoolean ob = XsdTypeBoolean(); IDManager.SetID(paymentDelayIDRef, ob); } else if (item.Attributes.ToString() == "href") { paymentDelayIDRef = item.Attributes["href"].Name; } else { paymentDelay = new XsdTypeBoolean(item); } } } XmlNodeList initialPointsNodeList = xmlNode.SelectNodes("initialPoints"); if (initialPointsNodeList.Count > 1) { throw new Exception(); } foreach (XmlNode item in initialPointsNodeList) { if (item.Attributes["href"] != null || item.Attributes["id"] == null) { if (item.Attributes["id"] != null) { initialPointsIDRef = item.Attributes["id"].Name; XsdTypeDecimal ob = XsdTypeDecimal(); IDManager.SetID(initialPointsIDRef, ob); } else if (item.Attributes.ToString() == "href") { initialPointsIDRef = item.Attributes["href"].Name; } else { initialPoints = new XsdTypeDecimal(item); } } } XmlNodeList quotationStyleNodeList = xmlNode.SelectNodes("quotationStyle"); if (quotationStyleNodeList.Count > 1) { throw new Exception(); } foreach (XmlNode item in quotationStyleNodeList) { if (item.Attributes["href"] != null || item.Attributes["id"] == null) { if (item.Attributes["id"] != null) { quotationStyleIDRef = item.Attributes["id"].Name; QuotationStyleEnum ob = QuotationStyleEnum(); IDManager.SetID(quotationStyleIDRef, ob); } else if (item.Attributes.ToString() == "href") { quotationStyleIDRef = item.Attributes["href"].Name; } else { quotationStyle = new QuotationStyleEnum(item); } } } }
public FeeLeg(XmlNode xmlNode) : base(xmlNode) { XmlNodeList initialPaymentNodeList = xmlNode.SelectNodes("initialPayment"); if (initialPaymentNodeList.Count > 1 ) { throw new Exception(); } foreach (XmlNode item in initialPaymentNodeList) { if (item.Attributes["href"] != null || item.Attributes["id"] == null) { if (item.Attributes["id"] != null) { initialPaymentIDRef = item.Attributes["id"].Name; InitialPayment ob = InitialPayment(); IDManager.SetID(initialPaymentIDRef, ob); } else if (item.Attributes.ToString() == "href") { initialPaymentIDRef = item.Attributes["href"].Name; } else { initialPayment = new InitialPayment(item); } } } XmlNodeList singlePaymentNodeList = xmlNode.SelectNodes("singlePayment"); foreach (XmlNode item in singlePaymentNodeList) { if (item.Attributes["href"] != null || item.Attributes["id"] == null) { if (item.Attributes["id"] != null) { singlePaymentIDRef = item.Attributes["id"].Name; List<SinglePayment> ob = new List<SinglePayment>(); ob.Add(new SinglePayment(item)); IDManager.SetID(singlePaymentIDRef, ob); } else if (item.Attributes.ToString() == "href") { singlePaymentIDRef = item.Attributes["href"].Name; } else { singlePayment.Add(new SinglePayment(item)); } } } XmlNodeList periodicPaymentNodeList = xmlNode.SelectNodes("periodicPayment"); if (periodicPaymentNodeList.Count > 1 ) { throw new Exception(); } foreach (XmlNode item in periodicPaymentNodeList) { if (item.Attributes["href"] != null || item.Attributes["id"] == null) { if (item.Attributes["id"] != null) { periodicPaymentIDRef = item.Attributes["id"].Name; PeriodicPayment ob = PeriodicPayment(); IDManager.SetID(periodicPaymentIDRef, ob); } else if (item.Attributes.ToString() == "href") { periodicPaymentIDRef = item.Attributes["href"].Name; } else { periodicPayment = new PeriodicPayment(item); } } } XmlNodeList marketFixedRateNodeList = xmlNode.SelectNodes("marketFixedRate"); if (marketFixedRateNodeList.Count > 1 ) { throw new Exception(); } foreach (XmlNode item in marketFixedRateNodeList) { if (item.Attributes["href"] != null || item.Attributes["id"] == null) { if (item.Attributes["id"] != null) { marketFixedRateIDRef = item.Attributes["id"].Name; XsdTypeDecimal ob = XsdTypeDecimal(); IDManager.SetID(marketFixedRateIDRef, ob); } else if (item.Attributes.ToString() == "href") { marketFixedRateIDRef = item.Attributes["href"].Name; } else { marketFixedRate = new XsdTypeDecimal(item); } } } XmlNodeList paymentDelayNodeList = xmlNode.SelectNodes("paymentDelay"); if (paymentDelayNodeList.Count > 1 ) { throw new Exception(); } foreach (XmlNode item in paymentDelayNodeList) { if (item.Attributes["href"] != null || item.Attributes["id"] == null) { if (item.Attributes["id"] != null) { paymentDelayIDRef = item.Attributes["id"].Name; XsdTypeBoolean ob = XsdTypeBoolean(); IDManager.SetID(paymentDelayIDRef, ob); } else if (item.Attributes.ToString() == "href") { paymentDelayIDRef = item.Attributes["href"].Name; } else { paymentDelay = new XsdTypeBoolean(item); } } } XmlNodeList initialPointsNodeList = xmlNode.SelectNodes("initialPoints"); if (initialPointsNodeList.Count > 1 ) { throw new Exception(); } foreach (XmlNode item in initialPointsNodeList) { if (item.Attributes["href"] != null || item.Attributes["id"] == null) { if (item.Attributes["id"] != null) { initialPointsIDRef = item.Attributes["id"].Name; XsdTypeDecimal ob = XsdTypeDecimal(); IDManager.SetID(initialPointsIDRef, ob); } else if (item.Attributes.ToString() == "href") { initialPointsIDRef = item.Attributes["href"].Name; } else { initialPoints = new XsdTypeDecimal(item); } } } XmlNodeList quotationStyleNodeList = xmlNode.SelectNodes("quotationStyle"); if (quotationStyleNodeList.Count > 1 ) { throw new Exception(); } foreach (XmlNode item in quotationStyleNodeList) { if (item.Attributes["href"] != null || item.Attributes["id"] == null) { if (item.Attributes["id"] != null) { quotationStyleIDRef = item.Attributes["id"].Name; QuotationStyleEnum ob = QuotationStyleEnum(); IDManager.SetID(quotationStyleIDRef, ob); } else if (item.Attributes.ToString() == "href") { quotationStyleIDRef = item.Attributes["href"].Name; } else { quotationStyle = new QuotationStyleEnum(item); } } } }