public EquityValuation(XmlNode xmlNode) { XmlNode valuationDateNode = xmlNode.SelectSingleNode("valuationDate"); if (valuationDateNode != null) { if (valuationDateNode.Attributes["href"] != null || valuationDateNode.Attributes["id"] != null) { if (valuationDateNode.Attributes["id"] != null) { valuationDateIDRef_ = valuationDateNode.Attributes["id"].Value; AdjustableDateOrRelativeDateSequence ob = new AdjustableDateOrRelativeDateSequence(valuationDateNode); IDManager.SetID(valuationDateIDRef_, ob); } else if (valuationDateNode.Attributes["href"] != null) { valuationDateIDRef_ = valuationDateNode.Attributes["href"].Value; } else { valuationDate_ = new AdjustableDateOrRelativeDateSequence(valuationDateNode); } } else { valuationDate_ = new AdjustableDateOrRelativeDateSequence(valuationDateNode); } } XmlNode valuationDatesNode = xmlNode.SelectSingleNode("valuationDates"); if (valuationDatesNode != null) { if (valuationDatesNode.Attributes["href"] != null || valuationDatesNode.Attributes["id"] != null) { if (valuationDatesNode.Attributes["id"] != null) { valuationDatesIDRef_ = valuationDatesNode.Attributes["id"].Value; AdjustableRelativeOrPeriodicDates ob = new AdjustableRelativeOrPeriodicDates(valuationDatesNode); IDManager.SetID(valuationDatesIDRef_, ob); } else if (valuationDatesNode.Attributes["href"] != null) { valuationDatesIDRef_ = valuationDatesNode.Attributes["href"].Value; } else { valuationDates_ = new AdjustableRelativeOrPeriodicDates(valuationDatesNode); } } else { valuationDates_ = new AdjustableRelativeOrPeriodicDates(valuationDatesNode); } } XmlNode valuationTimeTypeNode = xmlNode.SelectSingleNode("valuationTimeType"); if (valuationTimeTypeNode != null) { if (valuationTimeTypeNode.Attributes["href"] != null || valuationTimeTypeNode.Attributes["id"] != null) { if (valuationTimeTypeNode.Attributes["id"] != null) { valuationTimeTypeIDRef_ = valuationTimeTypeNode.Attributes["id"].Value; TimeTypeEnum ob = new TimeTypeEnum(valuationTimeTypeNode); IDManager.SetID(valuationTimeTypeIDRef_, ob); } else if (valuationTimeTypeNode.Attributes["href"] != null) { valuationTimeTypeIDRef_ = valuationTimeTypeNode.Attributes["href"].Value; } else { valuationTimeType_ = new TimeTypeEnum(valuationTimeTypeNode); } } else { valuationTimeType_ = new TimeTypeEnum(valuationTimeTypeNode); } } XmlNode valuationTimeNode = xmlNode.SelectSingleNode("valuationTime"); if (valuationTimeNode != null) { if (valuationTimeNode.Attributes["href"] != null || valuationTimeNode.Attributes["id"] != null) { if (valuationTimeNode.Attributes["id"] != null) { valuationTimeIDRef_ = valuationTimeNode.Attributes["id"].Value; BusinessCenterTime ob = new BusinessCenterTime(valuationTimeNode); IDManager.SetID(valuationTimeIDRef_, ob); } else if (valuationTimeNode.Attributes["href"] != null) { valuationTimeIDRef_ = valuationTimeNode.Attributes["href"].Value; } else { valuationTime_ = new BusinessCenterTime(valuationTimeNode); } } else { valuationTime_ = new BusinessCenterTime(valuationTimeNode); } } XmlNode futuresPriceValuationNode = xmlNode.SelectSingleNode("futuresPriceValuation"); if (futuresPriceValuationNode != null) { if (futuresPriceValuationNode.Attributes["href"] != null || futuresPriceValuationNode.Attributes["id"] != null) { if (futuresPriceValuationNode.Attributes["id"] != null) { futuresPriceValuationIDRef_ = futuresPriceValuationNode.Attributes["id"].Value; XsdTypeBoolean ob = new XsdTypeBoolean(futuresPriceValuationNode); IDManager.SetID(futuresPriceValuationIDRef_, ob); } else if (futuresPriceValuationNode.Attributes["href"] != null) { futuresPriceValuationIDRef_ = futuresPriceValuationNode.Attributes["href"].Value; } else { futuresPriceValuation_ = new XsdTypeBoolean(futuresPriceValuationNode); } } else { futuresPriceValuation_ = new XsdTypeBoolean(futuresPriceValuationNode); } } XmlNode optionsPriceValuationNode = xmlNode.SelectSingleNode("optionsPriceValuation"); if (optionsPriceValuationNode != null) { if (optionsPriceValuationNode.Attributes["href"] != null || optionsPriceValuationNode.Attributes["id"] != null) { if (optionsPriceValuationNode.Attributes["id"] != null) { optionsPriceValuationIDRef_ = optionsPriceValuationNode.Attributes["id"].Value; XsdTypeBoolean ob = new XsdTypeBoolean(optionsPriceValuationNode); IDManager.SetID(optionsPriceValuationIDRef_, ob); } else if (optionsPriceValuationNode.Attributes["href"] != null) { optionsPriceValuationIDRef_ = optionsPriceValuationNode.Attributes["href"].Value; } else { optionsPriceValuation_ = new XsdTypeBoolean(optionsPriceValuationNode); } } else { optionsPriceValuation_ = new XsdTypeBoolean(optionsPriceValuationNode); } } XmlNode numberOfValuationDatesNode = xmlNode.SelectSingleNode("numberOfValuationDates"); if (numberOfValuationDatesNode != null) { if (numberOfValuationDatesNode.Attributes["href"] != null || numberOfValuationDatesNode.Attributes["id"] != null) { if (numberOfValuationDatesNode.Attributes["id"] != null) { numberOfValuationDatesIDRef_ = numberOfValuationDatesNode.Attributes["id"].Value; XsdTypeNonNegativeInteger ob = new XsdTypeNonNegativeInteger(numberOfValuationDatesNode); IDManager.SetID(numberOfValuationDatesIDRef_, ob); } else if (numberOfValuationDatesNode.Attributes["href"] != null) { numberOfValuationDatesIDRef_ = numberOfValuationDatesNode.Attributes["href"].Value; } else { numberOfValuationDates_ = new XsdTypeNonNegativeInteger(numberOfValuationDatesNode); } } else { numberOfValuationDates_ = new XsdTypeNonNegativeInteger(numberOfValuationDatesNode); } } XmlNode dividendValuationDatesNode = xmlNode.SelectSingleNode("dividendValuationDates"); if (dividendValuationDatesNode != null) { if (dividendValuationDatesNode.Attributes["href"] != null || dividendValuationDatesNode.Attributes["id"] != null) { if (dividendValuationDatesNode.Attributes["id"] != null) { dividendValuationDatesIDRef_ = dividendValuationDatesNode.Attributes["id"].Value; AdjustableRelativeOrPeriodicDates ob = new AdjustableRelativeOrPeriodicDates(dividendValuationDatesNode); IDManager.SetID(dividendValuationDatesIDRef_, ob); } else if (dividendValuationDatesNode.Attributes["href"] != null) { dividendValuationDatesIDRef_ = dividendValuationDatesNode.Attributes["href"].Value; } else { dividendValuationDates_ = new AdjustableRelativeOrPeriodicDates(dividendValuationDatesNode); } } else { dividendValuationDates_ = new AdjustableRelativeOrPeriodicDates(dividendValuationDatesNode); } } XmlNode fPVFinalPriceElectionFallbackNode = xmlNode.SelectSingleNode("fPVFinalPriceElectionFallback"); if (fPVFinalPriceElectionFallbackNode != null) { if (fPVFinalPriceElectionFallbackNode.Attributes["href"] != null || fPVFinalPriceElectionFallbackNode.Attributes["id"] != null) { if (fPVFinalPriceElectionFallbackNode.Attributes["id"] != null) { fPVFinalPriceElectionFallbackIDRef_ = fPVFinalPriceElectionFallbackNode.Attributes["id"].Value; FPVFinalPriceElectionFallbackEnum ob = new FPVFinalPriceElectionFallbackEnum(fPVFinalPriceElectionFallbackNode); IDManager.SetID(fPVFinalPriceElectionFallbackIDRef_, ob); } else if (fPVFinalPriceElectionFallbackNode.Attributes["href"] != null) { fPVFinalPriceElectionFallbackIDRef_ = fPVFinalPriceElectionFallbackNode.Attributes["href"].Value; } else { fPVFinalPriceElectionFallback_ = new FPVFinalPriceElectionFallbackEnum(fPVFinalPriceElectionFallbackNode); } } else { fPVFinalPriceElectionFallback_ = new FPVFinalPriceElectionFallbackEnum(fPVFinalPriceElectionFallbackNode); } } }
public EquityValuation(XmlNode xmlNode) { XmlNodeList valuationDateNodeList = xmlNode.SelectNodes("valuationDate"); if (valuationDateNodeList.Count > 1) { throw new Exception(); } foreach (XmlNode item in valuationDateNodeList) { if (item.Attributes["href"] != null || item.Attributes["id"] == null) { if (item.Attributes["id"] != null) { valuationDateIDRef = item.Attributes["id"].Name; AdjustableDateOrRelativeDateSequence ob = AdjustableDateOrRelativeDateSequence(); IDManager.SetID(valuationDateIDRef, ob); } else if (item.Attributes.ToString() == "href") { valuationDateIDRef = item.Attributes["href"].Name; } else { valuationDate = new AdjustableDateOrRelativeDateSequence(item); } } } XmlNodeList valuationDatesNodeList = xmlNode.SelectNodes("valuationDates"); if (valuationDatesNodeList.Count > 1) { throw new Exception(); } foreach (XmlNode item in valuationDatesNodeList) { if (item.Attributes["href"] != null || item.Attributes["id"] == null) { if (item.Attributes["id"] != null) { valuationDatesIDRef = item.Attributes["id"].Name; AdjustableRelativeOrPeriodicDates ob = AdjustableRelativeOrPeriodicDates(); IDManager.SetID(valuationDatesIDRef, ob); } else if (item.Attributes.ToString() == "href") { valuationDatesIDRef = item.Attributes["href"].Name; } else { valuationDates = new AdjustableRelativeOrPeriodicDates(item); } } } XmlNodeList valuationTimeTypeNodeList = xmlNode.SelectNodes("valuationTimeType"); if (valuationTimeTypeNodeList.Count > 1) { throw new Exception(); } foreach (XmlNode item in valuationTimeTypeNodeList) { if (item.Attributes["href"] != null || item.Attributes["id"] == null) { if (item.Attributes["id"] != null) { valuationTimeTypeIDRef = item.Attributes["id"].Name; TimeTypeEnum ob = TimeTypeEnum(); IDManager.SetID(valuationTimeTypeIDRef, ob); } else if (item.Attributes.ToString() == "href") { valuationTimeTypeIDRef = item.Attributes["href"].Name; } else { valuationTimeType = new TimeTypeEnum(item); } } } XmlNodeList valuationTimeNodeList = xmlNode.SelectNodes("valuationTime"); if (valuationTimeNodeList.Count > 1) { throw new Exception(); } foreach (XmlNode item in valuationTimeNodeList) { if (item.Attributes["href"] != null || item.Attributes["id"] == null) { if (item.Attributes["id"] != null) { valuationTimeIDRef = item.Attributes["id"].Name; BusinessCenterTime ob = BusinessCenterTime(); IDManager.SetID(valuationTimeIDRef, ob); } else if (item.Attributes.ToString() == "href") { valuationTimeIDRef = item.Attributes["href"].Name; } else { valuationTime = new BusinessCenterTime(item); } } } XmlNodeList futuresPriceValuationNodeList = xmlNode.SelectNodes("futuresPriceValuation"); if (futuresPriceValuationNodeList.Count > 1) { throw new Exception(); } foreach (XmlNode item in futuresPriceValuationNodeList) { if (item.Attributes["href"] != null || item.Attributes["id"] == null) { if (item.Attributes["id"] != null) { futuresPriceValuationIDRef = item.Attributes["id"].Name; XsdTypeBoolean ob = XsdTypeBoolean(); IDManager.SetID(futuresPriceValuationIDRef, ob); } else if (item.Attributes.ToString() == "href") { futuresPriceValuationIDRef = item.Attributes["href"].Name; } else { futuresPriceValuation = new XsdTypeBoolean(item); } } } XmlNodeList optionsPriceValuationNodeList = xmlNode.SelectNodes("optionsPriceValuation"); if (optionsPriceValuationNodeList.Count > 1) { throw new Exception(); } foreach (XmlNode item in optionsPriceValuationNodeList) { if (item.Attributes["href"] != null || item.Attributes["id"] == null) { if (item.Attributes["id"] != null) { optionsPriceValuationIDRef = item.Attributes["id"].Name; XsdTypeBoolean ob = XsdTypeBoolean(); IDManager.SetID(optionsPriceValuationIDRef, ob); } else if (item.Attributes.ToString() == "href") { optionsPriceValuationIDRef = item.Attributes["href"].Name; } else { optionsPriceValuation = new XsdTypeBoolean(item); } } } XmlNodeList numberOfValuationDatesNodeList = xmlNode.SelectNodes("numberOfValuationDates"); if (numberOfValuationDatesNodeList.Count > 1) { throw new Exception(); } foreach (XmlNode item in numberOfValuationDatesNodeList) { if (item.Attributes["href"] != null || item.Attributes["id"] == null) { if (item.Attributes["id"] != null) { numberOfValuationDatesIDRef = item.Attributes["id"].Name; XsdTypeNonNegativeInteger ob = XsdTypeNonNegativeInteger(); IDManager.SetID(numberOfValuationDatesIDRef, ob); } else if (item.Attributes.ToString() == "href") { numberOfValuationDatesIDRef = item.Attributes["href"].Name; } else { numberOfValuationDates = new XsdTypeNonNegativeInteger(item); } } } XmlNodeList dividendValuationDatesNodeList = xmlNode.SelectNodes("dividendValuationDates"); if (dividendValuationDatesNodeList.Count > 1) { throw new Exception(); } foreach (XmlNode item in dividendValuationDatesNodeList) { if (item.Attributes["href"] != null || item.Attributes["id"] == null) { if (item.Attributes["id"] != null) { dividendValuationDatesIDRef = item.Attributes["id"].Name; AdjustableRelativeOrPeriodicDates ob = AdjustableRelativeOrPeriodicDates(); IDManager.SetID(dividendValuationDatesIDRef, ob); } else if (item.Attributes.ToString() == "href") { dividendValuationDatesIDRef = item.Attributes["href"].Name; } else { dividendValuationDates = new AdjustableRelativeOrPeriodicDates(item); } } } XmlNodeList fPVFinalPriceElectionFallbackNodeList = xmlNode.SelectNodes("fPVFinalPriceElectionFallback"); if (fPVFinalPriceElectionFallbackNodeList.Count > 1) { throw new Exception(); } foreach (XmlNode item in fPVFinalPriceElectionFallbackNodeList) { if (item.Attributes["href"] != null || item.Attributes["id"] == null) { if (item.Attributes["id"] != null) { fPVFinalPriceElectionFallbackIDRef = item.Attributes["id"].Name; FPVFinalPriceElectionFallbackEnum ob = FPVFinalPriceElectionFallbackEnum(); IDManager.SetID(fPVFinalPriceElectionFallbackIDRef, ob); } else if (item.Attributes.ToString() == "href") { fPVFinalPriceElectionFallbackIDRef = item.Attributes["href"].Name; } else { fPVFinalPriceElectionFallback = new FPVFinalPriceElectionFallbackEnum(item); } } } }
public EquityValuation(XmlNode xmlNode) { XmlNodeList valuationDateNodeList = xmlNode.SelectNodes("valuationDate"); if (valuationDateNodeList.Count > 1 ) { throw new Exception(); } foreach (XmlNode item in valuationDateNodeList) { if (item.Attributes["href"] != null || item.Attributes["id"] == null) { if (item.Attributes["id"] != null) { valuationDateIDRef = item.Attributes["id"].Name; AdjustableDateOrRelativeDateSequence ob = AdjustableDateOrRelativeDateSequence(); IDManager.SetID(valuationDateIDRef, ob); } else if (item.Attributes.ToString() == "href") { valuationDateIDRef = item.Attributes["href"].Name; } else { valuationDate = new AdjustableDateOrRelativeDateSequence(item); } } } XmlNodeList valuationDatesNodeList = xmlNode.SelectNodes("valuationDates"); if (valuationDatesNodeList.Count > 1 ) { throw new Exception(); } foreach (XmlNode item in valuationDatesNodeList) { if (item.Attributes["href"] != null || item.Attributes["id"] == null) { if (item.Attributes["id"] != null) { valuationDatesIDRef = item.Attributes["id"].Name; AdjustableRelativeOrPeriodicDates ob = AdjustableRelativeOrPeriodicDates(); IDManager.SetID(valuationDatesIDRef, ob); } else if (item.Attributes.ToString() == "href") { valuationDatesIDRef = item.Attributes["href"].Name; } else { valuationDates = new AdjustableRelativeOrPeriodicDates(item); } } } XmlNodeList valuationTimeTypeNodeList = xmlNode.SelectNodes("valuationTimeType"); if (valuationTimeTypeNodeList.Count > 1 ) { throw new Exception(); } foreach (XmlNode item in valuationTimeTypeNodeList) { if (item.Attributes["href"] != null || item.Attributes["id"] == null) { if (item.Attributes["id"] != null) { valuationTimeTypeIDRef = item.Attributes["id"].Name; TimeTypeEnum ob = TimeTypeEnum(); IDManager.SetID(valuationTimeTypeIDRef, ob); } else if (item.Attributes.ToString() == "href") { valuationTimeTypeIDRef = item.Attributes["href"].Name; } else { valuationTimeType = new TimeTypeEnum(item); } } } XmlNodeList valuationTimeNodeList = xmlNode.SelectNodes("valuationTime"); if (valuationTimeNodeList.Count > 1 ) { throw new Exception(); } foreach (XmlNode item in valuationTimeNodeList) { if (item.Attributes["href"] != null || item.Attributes["id"] == null) { if (item.Attributes["id"] != null) { valuationTimeIDRef = item.Attributes["id"].Name; BusinessCenterTime ob = BusinessCenterTime(); IDManager.SetID(valuationTimeIDRef, ob); } else if (item.Attributes.ToString() == "href") { valuationTimeIDRef = item.Attributes["href"].Name; } else { valuationTime = new BusinessCenterTime(item); } } } XmlNodeList futuresPriceValuationNodeList = xmlNode.SelectNodes("futuresPriceValuation"); if (futuresPriceValuationNodeList.Count > 1 ) { throw new Exception(); } foreach (XmlNode item in futuresPriceValuationNodeList) { if (item.Attributes["href"] != null || item.Attributes["id"] == null) { if (item.Attributes["id"] != null) { futuresPriceValuationIDRef = item.Attributes["id"].Name; XsdTypeBoolean ob = XsdTypeBoolean(); IDManager.SetID(futuresPriceValuationIDRef, ob); } else if (item.Attributes.ToString() == "href") { futuresPriceValuationIDRef = item.Attributes["href"].Name; } else { futuresPriceValuation = new XsdTypeBoolean(item); } } } XmlNodeList optionsPriceValuationNodeList = xmlNode.SelectNodes("optionsPriceValuation"); if (optionsPriceValuationNodeList.Count > 1 ) { throw new Exception(); } foreach (XmlNode item in optionsPriceValuationNodeList) { if (item.Attributes["href"] != null || item.Attributes["id"] == null) { if (item.Attributes["id"] != null) { optionsPriceValuationIDRef = item.Attributes["id"].Name; XsdTypeBoolean ob = XsdTypeBoolean(); IDManager.SetID(optionsPriceValuationIDRef, ob); } else if (item.Attributes.ToString() == "href") { optionsPriceValuationIDRef = item.Attributes["href"].Name; } else { optionsPriceValuation = new XsdTypeBoolean(item); } } } XmlNodeList numberOfValuationDatesNodeList = xmlNode.SelectNodes("numberOfValuationDates"); if (numberOfValuationDatesNodeList.Count > 1 ) { throw new Exception(); } foreach (XmlNode item in numberOfValuationDatesNodeList) { if (item.Attributes["href"] != null || item.Attributes["id"] == null) { if (item.Attributes["id"] != null) { numberOfValuationDatesIDRef = item.Attributes["id"].Name; XsdTypeNonNegativeInteger ob = XsdTypeNonNegativeInteger(); IDManager.SetID(numberOfValuationDatesIDRef, ob); } else if (item.Attributes.ToString() == "href") { numberOfValuationDatesIDRef = item.Attributes["href"].Name; } else { numberOfValuationDates = new XsdTypeNonNegativeInteger(item); } } } XmlNodeList dividendValuationDatesNodeList = xmlNode.SelectNodes("dividendValuationDates"); if (dividendValuationDatesNodeList.Count > 1 ) { throw new Exception(); } foreach (XmlNode item in dividendValuationDatesNodeList) { if (item.Attributes["href"] != null || item.Attributes["id"] == null) { if (item.Attributes["id"] != null) { dividendValuationDatesIDRef = item.Attributes["id"].Name; AdjustableRelativeOrPeriodicDates ob = AdjustableRelativeOrPeriodicDates(); IDManager.SetID(dividendValuationDatesIDRef, ob); } else if (item.Attributes.ToString() == "href") { dividendValuationDatesIDRef = item.Attributes["href"].Name; } else { dividendValuationDates = new AdjustableRelativeOrPeriodicDates(item); } } } XmlNodeList fPVFinalPriceElectionFallbackNodeList = xmlNode.SelectNodes("fPVFinalPriceElectionFallback"); if (fPVFinalPriceElectionFallbackNodeList.Count > 1 ) { throw new Exception(); } foreach (XmlNode item in fPVFinalPriceElectionFallbackNodeList) { if (item.Attributes["href"] != null || item.Attributes["id"] == null) { if (item.Attributes["id"] != null) { fPVFinalPriceElectionFallbackIDRef = item.Attributes["id"].Name; FPVFinalPriceElectionFallbackEnum ob = FPVFinalPriceElectionFallbackEnum(); IDManager.SetID(fPVFinalPriceElectionFallbackIDRef, ob); } else if (item.Attributes.ToString() == "href") { fPVFinalPriceElectionFallbackIDRef = item.Attributes["href"].Name; } else { fPVFinalPriceElectionFallback = new FPVFinalPriceElectionFallbackEnum(item); } } } }