public FxFixingDate(XmlNode xmlNode) : base(xmlNode) { XmlNodeList businessDayConventionNodeList = xmlNode.SelectNodes("businessDayConvention"); if (businessDayConventionNodeList.Count > 1 ) { throw new Exception(); } foreach (XmlNode item in businessDayConventionNodeList) { if (item.Attributes["href"] != null || item.Attributes["id"] == null) { if (item.Attributes["id"] != null) { businessDayConventionIDRef = item.Attributes["id"].Name; BusinessDayConventionEnum ob = BusinessDayConventionEnum(); IDManager.SetID(businessDayConventionIDRef, ob); } else if (item.Attributes.ToString() == "href") { businessDayConventionIDRef = item.Attributes["href"].Name; } else { businessDayConvention = new BusinessDayConventionEnum(item); } } } XmlNodeList businessCentersReferenceNodeList = xmlNode.SelectNodes("businessCentersReference"); if (businessCentersReferenceNodeList.Count > 1 ) { throw new Exception(); } foreach (XmlNode item in businessCentersReferenceNodeList) { if (item.Attributes["href"] != null || item.Attributes["id"] == null) { if (item.Attributes["id"] != null) { businessCentersReferenceIDRef = item.Attributes["id"].Name; BusinessCentersReference ob = BusinessCentersReference(); IDManager.SetID(businessCentersReferenceIDRef, ob); } else if (item.Attributes.ToString() == "href") { businessCentersReferenceIDRef = item.Attributes["href"].Name; } else { businessCentersReference = new BusinessCentersReference(item); } } } XmlNodeList businessCentersNodeList = xmlNode.SelectNodes("businessCenters"); if (businessCentersNodeList.Count > 1 ) { throw new Exception(); } foreach (XmlNode item in businessCentersNodeList) { if (item.Attributes["href"] != null || item.Attributes["id"] == null) { if (item.Attributes["id"] != null) { businessCentersIDRef = item.Attributes["id"].Name; BusinessCenters ob = BusinessCenters(); IDManager.SetID(businessCentersIDRef, ob); } else if (item.Attributes.ToString() == "href") { businessCentersIDRef = item.Attributes["href"].Name; } else { businessCenters = new BusinessCenters(item); } } } XmlNodeList dateRelativeToPaymentDatesNodeList = xmlNode.SelectNodes("dateRelativeToPaymentDates"); if (dateRelativeToPaymentDatesNodeList.Count > 1 ) { throw new Exception(); } foreach (XmlNode item in dateRelativeToPaymentDatesNodeList) { if (item.Attributes["href"] != null || item.Attributes["id"] == null) { if (item.Attributes["id"] != null) { dateRelativeToPaymentDatesIDRef = item.Attributes["id"].Name; DateRelativeToPaymentDates ob = DateRelativeToPaymentDates(); IDManager.SetID(dateRelativeToPaymentDatesIDRef, ob); } else if (item.Attributes.ToString() == "href") { dateRelativeToPaymentDatesIDRef = item.Attributes["href"].Name; } else { dateRelativeToPaymentDates = new DateRelativeToPaymentDates(item); } } } XmlNodeList dateRelativeToCalculationPeriodDatesNodeList = xmlNode.SelectNodes("dateRelativeToCalculationPeriodDates"); if (dateRelativeToCalculationPeriodDatesNodeList.Count > 1 ) { throw new Exception(); } foreach (XmlNode item in dateRelativeToCalculationPeriodDatesNodeList) { if (item.Attributes["href"] != null || item.Attributes["id"] == null) { if (item.Attributes["id"] != null) { dateRelativeToCalculationPeriodDatesIDRef = item.Attributes["id"].Name; DateRelativeToCalculationPeriodDates ob = DateRelativeToCalculationPeriodDates(); IDManager.SetID(dateRelativeToCalculationPeriodDatesIDRef, ob); } else if (item.Attributes.ToString() == "href") { dateRelativeToCalculationPeriodDatesIDRef = item.Attributes["href"].Name; } else { dateRelativeToCalculationPeriodDates = new DateRelativeToCalculationPeriodDates(item); } } } }
public FxFixingDate(XmlNode xmlNode) : base(xmlNode) { XmlNode businessDayConventionNode = xmlNode.SelectSingleNode("businessDayConvention"); if (businessDayConventionNode != null) { if (businessDayConventionNode.Attributes["href"] != null || businessDayConventionNode.Attributes["id"] != null) { if (businessDayConventionNode.Attributes["id"] != null) { businessDayConventionIDRef_ = businessDayConventionNode.Attributes["id"].Value; BusinessDayConventionEnum ob = new BusinessDayConventionEnum(businessDayConventionNode); IDManager.SetID(businessDayConventionIDRef_, ob); } else if (businessDayConventionNode.Attributes["href"] != null) { businessDayConventionIDRef_ = businessDayConventionNode.Attributes["href"].Value; } else { businessDayConvention_ = new BusinessDayConventionEnum(businessDayConventionNode); } } else { businessDayConvention_ = new BusinessDayConventionEnum(businessDayConventionNode); } } XmlNode businessCentersReferenceNode = xmlNode.SelectSingleNode("businessCentersReference"); if (businessCentersReferenceNode != null) { if (businessCentersReferenceNode.Attributes["href"] != null || businessCentersReferenceNode.Attributes["id"] != null) { if (businessCentersReferenceNode.Attributes["id"] != null) { businessCentersReferenceIDRef_ = businessCentersReferenceNode.Attributes["id"].Value; BusinessCentersReference ob = new BusinessCentersReference(businessCentersReferenceNode); IDManager.SetID(businessCentersReferenceIDRef_, ob); } else if (businessCentersReferenceNode.Attributes["href"] != null) { businessCentersReferenceIDRef_ = businessCentersReferenceNode.Attributes["href"].Value; } else { businessCentersReference_ = new BusinessCentersReference(businessCentersReferenceNode); } } else { businessCentersReference_ = new BusinessCentersReference(businessCentersReferenceNode); } } XmlNode businessCentersNode = xmlNode.SelectSingleNode("businessCenters"); if (businessCentersNode != null) { if (businessCentersNode.Attributes["href"] != null || businessCentersNode.Attributes["id"] != null) { if (businessCentersNode.Attributes["id"] != null) { businessCentersIDRef_ = businessCentersNode.Attributes["id"].Value; BusinessCenters ob = new BusinessCenters(businessCentersNode); IDManager.SetID(businessCentersIDRef_, ob); } else if (businessCentersNode.Attributes["href"] != null) { businessCentersIDRef_ = businessCentersNode.Attributes["href"].Value; } else { businessCenters_ = new BusinessCenters(businessCentersNode); } } else { businessCenters_ = new BusinessCenters(businessCentersNode); } } XmlNode dateRelativeToPaymentDatesNode = xmlNode.SelectSingleNode("dateRelativeToPaymentDates"); if (dateRelativeToPaymentDatesNode != null) { if (dateRelativeToPaymentDatesNode.Attributes["href"] != null || dateRelativeToPaymentDatesNode.Attributes["id"] != null) { if (dateRelativeToPaymentDatesNode.Attributes["id"] != null) { dateRelativeToPaymentDatesIDRef_ = dateRelativeToPaymentDatesNode.Attributes["id"].Value; DateRelativeToPaymentDates ob = new DateRelativeToPaymentDates(dateRelativeToPaymentDatesNode); IDManager.SetID(dateRelativeToPaymentDatesIDRef_, ob); } else if (dateRelativeToPaymentDatesNode.Attributes["href"] != null) { dateRelativeToPaymentDatesIDRef_ = dateRelativeToPaymentDatesNode.Attributes["href"].Value; } else { dateRelativeToPaymentDates_ = new DateRelativeToPaymentDates(dateRelativeToPaymentDatesNode); } } else { dateRelativeToPaymentDates_ = new DateRelativeToPaymentDates(dateRelativeToPaymentDatesNode); } } XmlNode dateRelativeToCalculationPeriodDatesNode = xmlNode.SelectSingleNode("dateRelativeToCalculationPeriodDates"); if (dateRelativeToCalculationPeriodDatesNode != null) { if (dateRelativeToCalculationPeriodDatesNode.Attributes["href"] != null || dateRelativeToCalculationPeriodDatesNode.Attributes["id"] != null) { if (dateRelativeToCalculationPeriodDatesNode.Attributes["id"] != null) { dateRelativeToCalculationPeriodDatesIDRef_ = dateRelativeToCalculationPeriodDatesNode.Attributes["id"].Value; DateRelativeToCalculationPeriodDates ob = new DateRelativeToCalculationPeriodDates(dateRelativeToCalculationPeriodDatesNode); IDManager.SetID(dateRelativeToCalculationPeriodDatesIDRef_, ob); } else if (dateRelativeToCalculationPeriodDatesNode.Attributes["href"] != null) { dateRelativeToCalculationPeriodDatesIDRef_ = dateRelativeToCalculationPeriodDatesNode.Attributes["href"].Value; } else { dateRelativeToCalculationPeriodDates_ = new DateRelativeToCalculationPeriodDates(dateRelativeToCalculationPeriodDatesNode); } } else { dateRelativeToCalculationPeriodDates_ = new DateRelativeToCalculationPeriodDates(dateRelativeToCalculationPeriodDatesNode); } } }
public FxFixingDate(XmlNode xmlNode) : base(xmlNode) { XmlNodeList businessDayConventionNodeList = xmlNode.SelectNodes("businessDayConvention"); if (businessDayConventionNodeList.Count > 1) { throw new Exception(); } foreach (XmlNode item in businessDayConventionNodeList) { if (item.Attributes["href"] != null || item.Attributes["id"] == null) { if (item.Attributes["id"] != null) { businessDayConventionIDRef = item.Attributes["id"].Name; BusinessDayConventionEnum ob = BusinessDayConventionEnum(); IDManager.SetID(businessDayConventionIDRef, ob); } else if (item.Attributes.ToString() == "href") { businessDayConventionIDRef = item.Attributes["href"].Name; } else { businessDayConvention = new BusinessDayConventionEnum(item); } } } XmlNodeList businessCentersReferenceNodeList = xmlNode.SelectNodes("businessCentersReference"); if (businessCentersReferenceNodeList.Count > 1) { throw new Exception(); } foreach (XmlNode item in businessCentersReferenceNodeList) { if (item.Attributes["href"] != null || item.Attributes["id"] == null) { if (item.Attributes["id"] != null) { businessCentersReferenceIDRef = item.Attributes["id"].Name; BusinessCentersReference ob = BusinessCentersReference(); IDManager.SetID(businessCentersReferenceIDRef, ob); } else if (item.Attributes.ToString() == "href") { businessCentersReferenceIDRef = item.Attributes["href"].Name; } else { businessCentersReference = new BusinessCentersReference(item); } } } XmlNodeList businessCentersNodeList = xmlNode.SelectNodes("businessCenters"); if (businessCentersNodeList.Count > 1) { throw new Exception(); } foreach (XmlNode item in businessCentersNodeList) { if (item.Attributes["href"] != null || item.Attributes["id"] == null) { if (item.Attributes["id"] != null) { businessCentersIDRef = item.Attributes["id"].Name; BusinessCenters ob = BusinessCenters(); IDManager.SetID(businessCentersIDRef, ob); } else if (item.Attributes.ToString() == "href") { businessCentersIDRef = item.Attributes["href"].Name; } else { businessCenters = new BusinessCenters(item); } } } XmlNodeList dateRelativeToPaymentDatesNodeList = xmlNode.SelectNodes("dateRelativeToPaymentDates"); if (dateRelativeToPaymentDatesNodeList.Count > 1) { throw new Exception(); } foreach (XmlNode item in dateRelativeToPaymentDatesNodeList) { if (item.Attributes["href"] != null || item.Attributes["id"] == null) { if (item.Attributes["id"] != null) { dateRelativeToPaymentDatesIDRef = item.Attributes["id"].Name; DateRelativeToPaymentDates ob = DateRelativeToPaymentDates(); IDManager.SetID(dateRelativeToPaymentDatesIDRef, ob); } else if (item.Attributes.ToString() == "href") { dateRelativeToPaymentDatesIDRef = item.Attributes["href"].Name; } else { dateRelativeToPaymentDates = new DateRelativeToPaymentDates(item); } } } XmlNodeList dateRelativeToCalculationPeriodDatesNodeList = xmlNode.SelectNodes("dateRelativeToCalculationPeriodDates"); if (dateRelativeToCalculationPeriodDatesNodeList.Count > 1) { throw new Exception(); } foreach (XmlNode item in dateRelativeToCalculationPeriodDatesNodeList) { if (item.Attributes["href"] != null || item.Attributes["id"] == null) { if (item.Attributes["id"] != null) { dateRelativeToCalculationPeriodDatesIDRef = item.Attributes["id"].Name; DateRelativeToCalculationPeriodDates ob = DateRelativeToCalculationPeriodDates(); IDManager.SetID(dateRelativeToCalculationPeriodDatesIDRef, ob); } else if (item.Attributes.ToString() == "href") { dateRelativeToCalculationPeriodDatesIDRef = item.Attributes["href"].Name; } else { dateRelativeToCalculationPeriodDates = new DateRelativeToCalculationPeriodDates(item); } } } }