public StrikeSchedule(XmlNode xmlNode) : base(xmlNode) { XmlNode buyerNode = xmlNode.SelectSingleNode("buyer"); if (buyerNode != null) { if (buyerNode.Attributes["href"] != null || buyerNode.Attributes["id"] != null) { if (buyerNode.Attributes["id"] != null) { buyerIDRef_ = buyerNode.Attributes["id"].Value; IdentifiedPayerReceiver ob = new IdentifiedPayerReceiver(buyerNode); IDManager.SetID(buyerIDRef_, ob); } else if (buyerNode.Attributes["href"] != null) { buyerIDRef_ = buyerNode.Attributes["href"].Value; } else { buyer_ = new IdentifiedPayerReceiver(buyerNode); } } else { buyer_ = new IdentifiedPayerReceiver(buyerNode); } } XmlNode sellerNode = xmlNode.SelectSingleNode("seller"); if (sellerNode != null) { if (sellerNode.Attributes["href"] != null || sellerNode.Attributes["id"] != null) { if (sellerNode.Attributes["id"] != null) { sellerIDRef_ = sellerNode.Attributes["id"].Value; IdentifiedPayerReceiver ob = new IdentifiedPayerReceiver(sellerNode); IDManager.SetID(sellerIDRef_, ob); } else if (sellerNode.Attributes["href"] != null) { sellerIDRef_ = sellerNode.Attributes["href"].Value; } else { seller_ = new IdentifiedPayerReceiver(sellerNode); } } else { seller_ = new IdentifiedPayerReceiver(sellerNode); } } }
public StrikeSchedule(XmlNode xmlNode) : base(xmlNode) { XmlNodeList buyerNodeList = xmlNode.SelectNodes("buyer"); if (buyerNodeList.Count > 1) { throw new Exception(); } foreach (XmlNode item in buyerNodeList) { if (item.Attributes["href"] != null || item.Attributes["id"] == null) { if (item.Attributes["id"] != null) { buyerIDRef = item.Attributes["id"].Name; IdentifiedPayerReceiver ob = IdentifiedPayerReceiver(); IDManager.SetID(buyerIDRef, ob); } else if (item.Attributes.ToString() == "href") { buyerIDRef = item.Attributes["href"].Name; } else { buyer = new IdentifiedPayerReceiver(item); } } } XmlNodeList sellerNodeList = xmlNode.SelectNodes("seller"); if (sellerNodeList.Count > 1) { throw new Exception(); } foreach (XmlNode item in sellerNodeList) { if (item.Attributes["href"] != null || item.Attributes["id"] == null) { if (item.Attributes["id"] != null) { sellerIDRef = item.Attributes["id"].Name; IdentifiedPayerReceiver ob = IdentifiedPayerReceiver(); IDManager.SetID(sellerIDRef, ob); } else if (item.Attributes.ToString() == "href") { sellerIDRef = item.Attributes["href"].Name; } else { seller = new IdentifiedPayerReceiver(item); } } } }
public StrikeSchedule(XmlNode xmlNode) : base(xmlNode) { XmlNodeList buyerNodeList = xmlNode.SelectNodes("buyer"); if (buyerNodeList.Count > 1 ) { throw new Exception(); } foreach (XmlNode item in buyerNodeList) { if (item.Attributes["href"] != null || item.Attributes["id"] == null) { if (item.Attributes["id"] != null) { buyerIDRef = item.Attributes["id"].Name; IdentifiedPayerReceiver ob = IdentifiedPayerReceiver(); IDManager.SetID(buyerIDRef, ob); } else if (item.Attributes.ToString() == "href") { buyerIDRef = item.Attributes["href"].Name; } else { buyer = new IdentifiedPayerReceiver(item); } } } XmlNodeList sellerNodeList = xmlNode.SelectNodes("seller"); if (sellerNodeList.Count > 1 ) { throw new Exception(); } foreach (XmlNode item in sellerNodeList) { if (item.Attributes["href"] != null || item.Attributes["id"] == null) { if (item.Attributes["id"] != null) { sellerIDRef = item.Attributes["id"].Name; IdentifiedPayerReceiver ob = IdentifiedPayerReceiver(); IDManager.SetID(sellerIDRef, ob); } else if (item.Attributes.ToString() == "href") { sellerIDRef = item.Attributes["href"].Name; } else { seller = new IdentifiedPayerReceiver(item); } } } }
public Strike(XmlNode xmlNode) { XmlNode strikeRateNode = xmlNode.SelectSingleNode("strikeRate"); if (strikeRateNode != null) { if (strikeRateNode.Attributes["href"] != null || strikeRateNode.Attributes["id"] != null) { if (strikeRateNode.Attributes["id"] != null) { strikeRateIDRef_ = strikeRateNode.Attributes["id"].Value; XsdTypeDecimal ob = new XsdTypeDecimal(strikeRateNode); IDManager.SetID(strikeRateIDRef_, ob); } else if (strikeRateNode.Attributes["href"] != null) { strikeRateIDRef_ = strikeRateNode.Attributes["href"].Value; } else { strikeRate_ = new XsdTypeDecimal(strikeRateNode); } } else { strikeRate_ = new XsdTypeDecimal(strikeRateNode); } } XmlNode buyerNode = xmlNode.SelectSingleNode("buyer"); if (buyerNode != null) { if (buyerNode.Attributes["href"] != null || buyerNode.Attributes["id"] != null) { if (buyerNode.Attributes["id"] != null) { buyerIDRef_ = buyerNode.Attributes["id"].Value; IdentifiedPayerReceiver ob = new IdentifiedPayerReceiver(buyerNode); IDManager.SetID(buyerIDRef_, ob); } else if (buyerNode.Attributes["href"] != null) { buyerIDRef_ = buyerNode.Attributes["href"].Value; } else { buyer_ = new IdentifiedPayerReceiver(buyerNode); } } else { buyer_ = new IdentifiedPayerReceiver(buyerNode); } } XmlNode sellerNode = xmlNode.SelectSingleNode("seller"); if (sellerNode != null) { if (sellerNode.Attributes["href"] != null || sellerNode.Attributes["id"] != null) { if (sellerNode.Attributes["id"] != null) { sellerIDRef_ = sellerNode.Attributes["id"].Value; IdentifiedPayerReceiver ob = new IdentifiedPayerReceiver(sellerNode); IDManager.SetID(sellerIDRef_, ob); } else if (sellerNode.Attributes["href"] != null) { sellerIDRef_ = sellerNode.Attributes["href"].Value; } else { seller_ = new IdentifiedPayerReceiver(sellerNode); } } else { seller_ = new IdentifiedPayerReceiver(sellerNode); } } }