public ConstPayoff(XmlNode xmlNode) { XmlNodeList constValueNodeList = xmlNode.SelectNodes("constValue"); if (constValueNodeList.Count > 1 ) { throw new Exception(); } foreach (XmlNode item in constValueNodeList) { if (item.Attributes["href"] != null || item.Attributes["id"] == null) { if (item.Attributes["id"] != null) { constValueIDRef = item.Attributes["id"].Name; XsdTypeDouble ob = XsdTypeDouble(); IDManager.SetID(constValueIDRef, ob); } else if (item.Attributes.ToString() == "href") { constValueIDRef = item.Attributes["href"].Name; } else { constValue = new XsdTypeDouble(item); } } } }
public UpDownEventCheck(XmlNode xmlNode) { XmlNodeList checkValueNodeList = xmlNode.SelectNodes("checkValue"); if (checkValueNodeList.Count > 1 ) { throw new Exception(); } foreach (XmlNode item in checkValueNodeList) { if (item.Attributes["href"] != null || item.Attributes["id"] == null) { if (item.Attributes["id"] != null) { checkValueIDRef = item.Attributes["id"].Name; XsdTypeDouble ob = XsdTypeDouble(); IDManager.SetID(checkValueIDRef, ob); } else if (item.Attributes.ToString() == "href") { checkValueIDRef = item.Attributes["href"].Name; } else { checkValue = new XsdTypeDouble(item); } } } XmlNodeList equalityNodeList = xmlNode.SelectNodes("equality"); if (equalityNodeList.Count > 1 ) { throw new Exception(); } foreach (XmlNode item in equalityNodeList) { if (item.Attributes["href"] != null || item.Attributes["id"] == null) { if (item.Attributes["id"] != null) { equalityIDRef = item.Attributes["id"].Name; XsdTypeBoolean ob = XsdTypeBoolean(); IDManager.SetID(equalityIDRef, ob); } else if (item.Attributes.ToString() == "href") { equalityIDRef = item.Attributes["href"].Name; } else { equality = new XsdTypeBoolean(item); } } } }
public RangeEventCheck(XmlNode xmlNode) { XmlNodeList highCheckValueNodeList = xmlNode.SelectNodes("highCheckValue"); if (highCheckValueNodeList.Count > 1 ) { throw new Exception(); } foreach (XmlNode item in highCheckValueNodeList) { if (item.Attributes["href"] != null || item.Attributes["id"] == null) { if (item.Attributes["id"] != null) { highCheckValueIDRef = item.Attributes["id"].Name; XsdTypeDouble ob = XsdTypeDouble(); IDManager.SetID(highCheckValueIDRef, ob); } else if (item.Attributes.ToString() == "href") { highCheckValueIDRef = item.Attributes["href"].Name; } else { highCheckValue = new XsdTypeDouble(item); } } } XmlNodeList highEqualityNodeList = xmlNode.SelectNodes("highEquality"); if (highEqualityNodeList.Count > 1 ) { throw new Exception(); } foreach (XmlNode item in highEqualityNodeList) { if (item.Attributes["href"] != null || item.Attributes["id"] == null) { if (item.Attributes["id"] != null) { highEqualityIDRef = item.Attributes["id"].Name; XsdTypeBoolean ob = XsdTypeBoolean(); IDManager.SetID(highEqualityIDRef, ob); } else if (item.Attributes.ToString() == "href") { highEqualityIDRef = item.Attributes["href"].Name; } else { highEquality = new XsdTypeBoolean(item); } } } XmlNodeList lowCheckValueNodeList = xmlNode.SelectNodes("lowCheckValue"); if (lowCheckValueNodeList.Count > 1 ) { throw new Exception(); } foreach (XmlNode item in lowCheckValueNodeList) { if (item.Attributes["href"] != null || item.Attributes["id"] == null) { if (item.Attributes["id"] != null) { lowCheckValueIDRef = item.Attributes["id"].Name; XsdTypeDouble ob = XsdTypeDouble(); IDManager.SetID(lowCheckValueIDRef, ob); } else if (item.Attributes.ToString() == "href") { lowCheckValueIDRef = item.Attributes["href"].Name; } else { lowCheckValue = new XsdTypeDouble(item); } } } XmlNodeList lowEqualityNodeList = xmlNode.SelectNodes("lowEquality"); if (lowEqualityNodeList.Count > 1 ) { throw new Exception(); } foreach (XmlNode item in lowEqualityNodeList) { if (item.Attributes["href"] != null || item.Attributes["id"] == null) { if (item.Attributes["id"] != null) { lowEqualityIDRef = item.Attributes["id"].Name; XsdTypeBoolean ob = XsdTypeBoolean(); IDManager.SetID(lowEqualityIDRef, ob); } else if (item.Attributes.ToString() == "href") { lowEqualityIDRef = item.Attributes["href"].Name; } else { lowEquality = new XsdTypeBoolean(item); } } } }
public VariableValue(XmlNode xmlNode) { XmlNodeList indexRefNodeList = xmlNode.SelectNodes("indexRef"); if (indexRefNodeList.Count > 1 ) { throw new Exception(); } foreach (XmlNode item in indexRefNodeList) { if (item.Attributes["href"] != null || item.Attributes["id"] == null) { if (item.Attributes["id"] != null) { indexRefIDRef = item.Attributes["id"].Name; IndexRef ob = IndexRef(); IDManager.SetID(indexRefIDRef, ob); } else if (item.Attributes.ToString() == "href") { indexRefIDRef = item.Attributes["href"].Name; } else { indexRef = new IndexRef(item); } } } XmlNodeList indexTimeRefNodeList = xmlNode.SelectNodes("indexTimeRef"); if (indexTimeRefNodeList.Count > 1 ) { throw new Exception(); } foreach (XmlNode item in indexTimeRefNodeList) { if (item.Attributes["href"] != null || item.Attributes["id"] == null) { if (item.Attributes["id"] != null) { indexTimeRefIDRef = item.Attributes["id"].Name; IndexTimeRef ob = IndexTimeRef(); IDManager.SetID(indexTimeRefIDRef, ob); } else if (item.Attributes.ToString() == "href") { indexTimeRefIDRef = item.Attributes["href"].Name; } else { indexTimeRef = new IndexTimeRef(item); } } } XmlNodeList symbolNameNodeList = xmlNode.SelectNodes("symbolName"); if (symbolNameNodeList.Count > 1 ) { throw new Exception(); } foreach (XmlNode item in symbolNameNodeList) { if (item.Attributes["href"] != null || item.Attributes["id"] == null) { if (item.Attributes["id"] != null) { symbolNameIDRef = item.Attributes["id"].Name; XsdTypeToken ob = XsdTypeToken(); IDManager.SetID(symbolNameIDRef, ob); } else if (item.Attributes.ToString() == "href") { symbolNameIDRef = item.Attributes["href"].Name; } else { symbolName = new XsdTypeToken(item); } } } XmlNodeList constValueNodeList = xmlNode.SelectNodes("constValue"); if (constValueNodeList.Count > 1 ) { throw new Exception(); } foreach (XmlNode item in constValueNodeList) { if (item.Attributes["href"] != null || item.Attributes["id"] == null) { if (item.Attributes["id"] != null) { constValueIDRef = item.Attributes["id"].Name; XsdTypeDouble ob = XsdTypeDouble(); IDManager.SetID(constValueIDRef, ob); } else if (item.Attributes.ToString() == "href") { constValueIDRef = item.Attributes["href"].Name; } else { constValue = new XsdTypeDouble(item); } } } }