public FxFeature(XmlNode xmlNode) { XmlNode referenceCurrencyNode = xmlNode.SelectSingleNode("referenceCurrency"); if (referenceCurrencyNode != null) { if (referenceCurrencyNode.Attributes["href"] != null || referenceCurrencyNode.Attributes["id"] != null) { if (referenceCurrencyNode.Attributes["id"] != null) { referenceCurrencyIDRef_ = referenceCurrencyNode.Attributes["id"].Value; IdentifiedCurrency ob = new IdentifiedCurrency(referenceCurrencyNode); IDManager.SetID(referenceCurrencyIDRef_, ob); } else if (referenceCurrencyNode.Attributes["href"] != null) { referenceCurrencyIDRef_ = referenceCurrencyNode.Attributes["href"].Value; } else { referenceCurrency_ = new IdentifiedCurrency(referenceCurrencyNode); } } else { referenceCurrency_ = new IdentifiedCurrency(referenceCurrencyNode); } } XmlNode compositeNode = xmlNode.SelectSingleNode("composite"); if (compositeNode != null) { if (compositeNode.Attributes["href"] != null || compositeNode.Attributes["id"] != null) { if (compositeNode.Attributes["id"] != null) { compositeIDRef_ = compositeNode.Attributes["id"].Value; Composite ob = new Composite(compositeNode); IDManager.SetID(compositeIDRef_, ob); } else if (compositeNode.Attributes["href"] != null) { compositeIDRef_ = compositeNode.Attributes["href"].Value; } else { composite_ = new Composite(compositeNode); } } else { composite_ = new Composite(compositeNode); } } XmlNode quantoNode = xmlNode.SelectSingleNode("quanto"); if (quantoNode != null) { if (quantoNode.Attributes["href"] != null || quantoNode.Attributes["id"] != null) { if (quantoNode.Attributes["id"] != null) { quantoIDRef_ = quantoNode.Attributes["id"].Value; Quanto ob = new Quanto(quantoNode); IDManager.SetID(quantoIDRef_, ob); } else if (quantoNode.Attributes["href"] != null) { quantoIDRef_ = quantoNode.Attributes["href"].Value; } else { quanto_ = new Quanto(quantoNode); } } else { quanto_ = new Quanto(quantoNode); } } XmlNode crossCurrencyNode = xmlNode.SelectSingleNode("crossCurrency"); if (crossCurrencyNode != null) { if (crossCurrencyNode.Attributes["href"] != null || crossCurrencyNode.Attributes["id"] != null) { if (crossCurrencyNode.Attributes["id"] != null) { crossCurrencyIDRef_ = crossCurrencyNode.Attributes["id"].Value; Composite ob = new Composite(crossCurrencyNode); IDManager.SetID(crossCurrencyIDRef_, ob); } else if (crossCurrencyNode.Attributes["href"] != null) { crossCurrencyIDRef_ = crossCurrencyNode.Attributes["href"].Value; } else { crossCurrency_ = new Composite(crossCurrencyNode); } } else { crossCurrency_ = new Composite(crossCurrencyNode); } } }
public FxFeature(XmlNode xmlNode) { XmlNodeList referenceCurrencyNodeList = xmlNode.SelectNodes("referenceCurrency"); if (referenceCurrencyNodeList.Count > 1 ) { throw new Exception(); } foreach (XmlNode item in referenceCurrencyNodeList) { if (item.Attributes["href"] != null || item.Attributes["id"] == null) { if (item.Attributes["id"] != null) { referenceCurrencyIDRef = item.Attributes["id"].Name; IdentifiedCurrency ob = IdentifiedCurrency(); IDManager.SetID(referenceCurrencyIDRef, ob); } else if (item.Attributes.ToString() == "href") { referenceCurrencyIDRef = item.Attributes["href"].Name; } else { referenceCurrency = new IdentifiedCurrency(item); } } } XmlNodeList compositeNodeList = xmlNode.SelectNodes("composite"); if (compositeNodeList.Count > 1 ) { throw new Exception(); } foreach (XmlNode item in compositeNodeList) { if (item.Attributes["href"] != null || item.Attributes["id"] == null) { if (item.Attributes["id"] != null) { compositeIDRef = item.Attributes["id"].Name; Composite ob = Composite(); IDManager.SetID(compositeIDRef, ob); } else if (item.Attributes.ToString() == "href") { compositeIDRef = item.Attributes["href"].Name; } else { composite = new Composite(item); } } } XmlNodeList quantoNodeList = xmlNode.SelectNodes("quanto"); if (quantoNodeList.Count > 1 ) { throw new Exception(); } foreach (XmlNode item in quantoNodeList) { if (item.Attributes["href"] != null || item.Attributes["id"] == null) { if (item.Attributes["id"] != null) { quantoIDRef = item.Attributes["id"].Name; Quanto ob = Quanto(); IDManager.SetID(quantoIDRef, ob); } else if (item.Attributes.ToString() == "href") { quantoIDRef = item.Attributes["href"].Name; } else { quanto = new Quanto(item); } } } XmlNodeList crossCurrencyNodeList = xmlNode.SelectNodes("crossCurrency"); if (crossCurrencyNodeList.Count > 1 ) { throw new Exception(); } foreach (XmlNode item in crossCurrencyNodeList) { if (item.Attributes["href"] != null || item.Attributes["id"] == null) { if (item.Attributes["id"] != null) { crossCurrencyIDRef = item.Attributes["id"].Name; Composite ob = Composite(); IDManager.SetID(crossCurrencyIDRef, ob); } else if (item.Attributes.ToString() == "href") { crossCurrencyIDRef = item.Attributes["href"].Name; } else { crossCurrency = new Composite(item); } } } }
public FxFeature(XmlNode xmlNode) { XmlNodeList referenceCurrencyNodeList = xmlNode.SelectNodes("referenceCurrency"); if (referenceCurrencyNodeList.Count > 1) { throw new Exception(); } foreach (XmlNode item in referenceCurrencyNodeList) { if (item.Attributes["href"] != null || item.Attributes["id"] == null) { if (item.Attributes["id"] != null) { referenceCurrencyIDRef = item.Attributes["id"].Name; IdentifiedCurrency ob = IdentifiedCurrency(); IDManager.SetID(referenceCurrencyIDRef, ob); } else if (item.Attributes.ToString() == "href") { referenceCurrencyIDRef = item.Attributes["href"].Name; } else { referenceCurrency = new IdentifiedCurrency(item); } } } XmlNodeList compositeNodeList = xmlNode.SelectNodes("composite"); if (compositeNodeList.Count > 1) { throw new Exception(); } foreach (XmlNode item in compositeNodeList) { if (item.Attributes["href"] != null || item.Attributes["id"] == null) { if (item.Attributes["id"] != null) { compositeIDRef = item.Attributes["id"].Name; Composite ob = Composite(); IDManager.SetID(compositeIDRef, ob); } else if (item.Attributes.ToString() == "href") { compositeIDRef = item.Attributes["href"].Name; } else { composite = new Composite(item); } } } XmlNodeList quantoNodeList = xmlNode.SelectNodes("quanto"); if (quantoNodeList.Count > 1) { throw new Exception(); } foreach (XmlNode item in quantoNodeList) { if (item.Attributes["href"] != null || item.Attributes["id"] == null) { if (item.Attributes["id"] != null) { quantoIDRef = item.Attributes["id"].Name; Quanto ob = Quanto(); IDManager.SetID(quantoIDRef, ob); } else if (item.Attributes.ToString() == "href") { quantoIDRef = item.Attributes["href"].Name; } else { quanto = new Quanto(item); } } } XmlNodeList crossCurrencyNodeList = xmlNode.SelectNodes("crossCurrency"); if (crossCurrencyNodeList.Count > 1) { throw new Exception(); } foreach (XmlNode item in crossCurrencyNodeList) { if (item.Attributes["href"] != null || item.Attributes["id"] == null) { if (item.Attributes["id"] != null) { crossCurrencyIDRef = item.Attributes["id"].Name; Composite ob = Composite(); IDManager.SetID(crossCurrencyIDRef, ob); } else if (item.Attributes.ToString() == "href") { crossCurrencyIDRef = item.Attributes["href"].Name; } else { crossCurrency = new Composite(item); } } } }