public Trigger(XmlNode xmlNode) { XmlNode levelNode = xmlNode.SelectSingleNode("level"); if (levelNode != null) { if (levelNode.Attributes["href"] != null || levelNode.Attributes["id"] != null) { if (levelNode.Attributes["id"] != null) { levelIDRef_ = levelNode.Attributes["id"].Value; XsdTypeDecimal ob = new XsdTypeDecimal(levelNode); IDManager.SetID(levelIDRef_, ob); } else if (levelNode.Attributes["href"] != null) { levelIDRef_ = levelNode.Attributes["href"].Value; } else { level_ = new XsdTypeDecimal(levelNode); } } else { level_ = new XsdTypeDecimal(levelNode); } } XmlNode levelPercentageNode = xmlNode.SelectSingleNode("levelPercentage"); if (levelPercentageNode != null) { if (levelPercentageNode.Attributes["href"] != null || levelPercentageNode.Attributes["id"] != null) { if (levelPercentageNode.Attributes["id"] != null) { levelPercentageIDRef_ = levelPercentageNode.Attributes["id"].Value; XsdTypeDecimal ob = new XsdTypeDecimal(levelPercentageNode); IDManager.SetID(levelPercentageIDRef_, ob); } else if (levelPercentageNode.Attributes["href"] != null) { levelPercentageIDRef_ = levelPercentageNode.Attributes["href"].Value; } else { levelPercentage_ = new XsdTypeDecimal(levelPercentageNode); } } else { levelPercentage_ = new XsdTypeDecimal(levelPercentageNode); } } XmlNode creditEventsNode = xmlNode.SelectSingleNode("creditEvents"); if (creditEventsNode != null) { if (creditEventsNode.Attributes["href"] != null || creditEventsNode.Attributes["id"] != null) { if (creditEventsNode.Attributes["id"] != null) { creditEventsIDRef_ = creditEventsNode.Attributes["id"].Value; CreditEvents ob = new CreditEvents(creditEventsNode); IDManager.SetID(creditEventsIDRef_, ob); } else if (creditEventsNode.Attributes["href"] != null) { creditEventsIDRef_ = creditEventsNode.Attributes["href"].Value; } else { creditEvents_ = new CreditEvents(creditEventsNode); } } else { creditEvents_ = new CreditEvents(creditEventsNode); } } XmlNode creditEventsReferenceNode = xmlNode.SelectSingleNode("creditEventsReference"); if (creditEventsReferenceNode != null) { if (creditEventsReferenceNode.Attributes["href"] != null || creditEventsReferenceNode.Attributes["id"] != null) { if (creditEventsReferenceNode.Attributes["id"] != null) { creditEventsReferenceIDRef_ = creditEventsReferenceNode.Attributes["id"].Value; CreditEventsReference ob = new CreditEventsReference(creditEventsReferenceNode); IDManager.SetID(creditEventsReferenceIDRef_, ob); } else if (creditEventsReferenceNode.Attributes["href"] != null) { creditEventsReferenceIDRef_ = creditEventsReferenceNode.Attributes["href"].Value; } else { creditEventsReference_ = new CreditEventsReference(creditEventsReferenceNode); } } else { creditEventsReference_ = new CreditEventsReference(creditEventsReferenceNode); } } XmlNode triggerTypeNode = xmlNode.SelectSingleNode("triggerType"); if (triggerTypeNode != null) { if (triggerTypeNode.Attributes["href"] != null || triggerTypeNode.Attributes["id"] != null) { if (triggerTypeNode.Attributes["id"] != null) { triggerTypeIDRef_ = triggerTypeNode.Attributes["id"].Value; TriggerTypeEnum ob = new TriggerTypeEnum(triggerTypeNode); IDManager.SetID(triggerTypeIDRef_, ob); } else if (triggerTypeNode.Attributes["href"] != null) { triggerTypeIDRef_ = triggerTypeNode.Attributes["href"].Value; } else { triggerType_ = new TriggerTypeEnum(triggerTypeNode); } } else { triggerType_ = new TriggerTypeEnum(triggerTypeNode); } } XmlNode triggerTimeTypeNode = xmlNode.SelectSingleNode("triggerTimeType"); if (triggerTimeTypeNode != null) { if (triggerTimeTypeNode.Attributes["href"] != null || triggerTimeTypeNode.Attributes["id"] != null) { if (triggerTimeTypeNode.Attributes["id"] != null) { triggerTimeTypeIDRef_ = triggerTimeTypeNode.Attributes["id"].Value; TriggerTimeTypeEnum ob = new TriggerTimeTypeEnum(triggerTimeTypeNode); IDManager.SetID(triggerTimeTypeIDRef_, ob); } else if (triggerTimeTypeNode.Attributes["href"] != null) { triggerTimeTypeIDRef_ = triggerTimeTypeNode.Attributes["href"].Value; } else { triggerTimeType_ = new TriggerTimeTypeEnum(triggerTimeTypeNode); } } else { triggerTimeType_ = new TriggerTimeTypeEnum(triggerTimeTypeNode); } } }
public Trigger(XmlNode xmlNode) { XmlNodeList levelNodeList = xmlNode.SelectNodes("level"); if (levelNodeList.Count > 1) { throw new Exception(); } foreach (XmlNode item in levelNodeList) { if (item.Attributes["href"] != null || item.Attributes["id"] == null) { if (item.Attributes["id"] != null) { levelIDRef = item.Attributes["id"].Name; XsdTypeDecimal ob = XsdTypeDecimal(); IDManager.SetID(levelIDRef, ob); } else if (item.Attributes.ToString() == "href") { levelIDRef = item.Attributes["href"].Name; } else { level = new XsdTypeDecimal(item); } } } XmlNodeList levelPercentageNodeList = xmlNode.SelectNodes("levelPercentage"); if (levelPercentageNodeList.Count > 1) { throw new Exception(); } foreach (XmlNode item in levelPercentageNodeList) { if (item.Attributes["href"] != null || item.Attributes["id"] == null) { if (item.Attributes["id"] != null) { levelPercentageIDRef = item.Attributes["id"].Name; XsdTypeDecimal ob = XsdTypeDecimal(); IDManager.SetID(levelPercentageIDRef, ob); } else if (item.Attributes.ToString() == "href") { levelPercentageIDRef = item.Attributes["href"].Name; } else { levelPercentage = new XsdTypeDecimal(item); } } } XmlNodeList creditEventsNodeList = xmlNode.SelectNodes("creditEvents"); if (creditEventsNodeList.Count > 1) { throw new Exception(); } foreach (XmlNode item in creditEventsNodeList) { if (item.Attributes["href"] != null || item.Attributes["id"] == null) { if (item.Attributes["id"] != null) { creditEventsIDRef = item.Attributes["id"].Name; CreditEvents ob = CreditEvents(); IDManager.SetID(creditEventsIDRef, ob); } else if (item.Attributes.ToString() == "href") { creditEventsIDRef = item.Attributes["href"].Name; } else { creditEvents = new CreditEvents(item); } } } XmlNodeList creditEventsReferenceNodeList = xmlNode.SelectNodes("creditEventsReference"); if (creditEventsReferenceNodeList.Count > 1) { throw new Exception(); } foreach (XmlNode item in creditEventsReferenceNodeList) { if (item.Attributes["href"] != null || item.Attributes["id"] == null) { if (item.Attributes["id"] != null) { creditEventsReferenceIDRef = item.Attributes["id"].Name; CreditEventsReference ob = CreditEventsReference(); IDManager.SetID(creditEventsReferenceIDRef, ob); } else if (item.Attributes.ToString() == "href") { creditEventsReferenceIDRef = item.Attributes["href"].Name; } else { creditEventsReference = new CreditEventsReference(item); } } } XmlNodeList triggerTypeNodeList = xmlNode.SelectNodes("triggerType"); if (triggerTypeNodeList.Count > 1) { throw new Exception(); } foreach (XmlNode item in triggerTypeNodeList) { if (item.Attributes["href"] != null || item.Attributes["id"] == null) { if (item.Attributes["id"] != null) { triggerTypeIDRef = item.Attributes["id"].Name; TriggerTypeEnum ob = TriggerTypeEnum(); IDManager.SetID(triggerTypeIDRef, ob); } else if (item.Attributes.ToString() == "href") { triggerTypeIDRef = item.Attributes["href"].Name; } else { triggerType = new TriggerTypeEnum(item); } } } XmlNodeList triggerTimeTypeNodeList = xmlNode.SelectNodes("triggerTimeType"); if (triggerTimeTypeNodeList.Count > 1) { throw new Exception(); } foreach (XmlNode item in triggerTimeTypeNodeList) { if (item.Attributes["href"] != null || item.Attributes["id"] == null) { if (item.Attributes["id"] != null) { triggerTimeTypeIDRef = item.Attributes["id"].Name; TriggerTimeTypeEnum ob = TriggerTimeTypeEnum(); IDManager.SetID(triggerTimeTypeIDRef, ob); } else if (item.Attributes.ToString() == "href") { triggerTimeTypeIDRef = item.Attributes["href"].Name; } else { triggerTimeType = new TriggerTimeTypeEnum(item); } } } }
public Trigger(XmlNode xmlNode) { XmlNode levelNode = xmlNode.SelectSingleNode("level"); if (levelNode != null) { if (levelNode.Attributes["href"] != null || levelNode.Attributes["id"] != null) { if (levelNode.Attributes["id"] != null) { levelIDRef_ = levelNode.Attributes["id"].Value; XsdTypeDecimal ob = new XsdTypeDecimal(levelNode); IDManager.SetID(levelIDRef_, ob); } else if (levelNode.Attributes["href"] != null) { levelIDRef_ = levelNode.Attributes["href"].Value; } else { level_ = new XsdTypeDecimal(levelNode); } } else { level_ = new XsdTypeDecimal(levelNode); } } XmlNode levelPercentageNode = xmlNode.SelectSingleNode("levelPercentage"); if (levelPercentageNode != null) { if (levelPercentageNode.Attributes["href"] != null || levelPercentageNode.Attributes["id"] != null) { if (levelPercentageNode.Attributes["id"] != null) { levelPercentageIDRef_ = levelPercentageNode.Attributes["id"].Value; XsdTypeDecimal ob = new XsdTypeDecimal(levelPercentageNode); IDManager.SetID(levelPercentageIDRef_, ob); } else if (levelPercentageNode.Attributes["href"] != null) { levelPercentageIDRef_ = levelPercentageNode.Attributes["href"].Value; } else { levelPercentage_ = new XsdTypeDecimal(levelPercentageNode); } } else { levelPercentage_ = new XsdTypeDecimal(levelPercentageNode); } } XmlNode creditEventsNode = xmlNode.SelectSingleNode("creditEvents"); if (creditEventsNode != null) { if (creditEventsNode.Attributes["href"] != null || creditEventsNode.Attributes["id"] != null) { if (creditEventsNode.Attributes["id"] != null) { creditEventsIDRef_ = creditEventsNode.Attributes["id"].Value; CreditEvents ob = new CreditEvents(creditEventsNode); IDManager.SetID(creditEventsIDRef_, ob); } else if (creditEventsNode.Attributes["href"] != null) { creditEventsIDRef_ = creditEventsNode.Attributes["href"].Value; } else { creditEvents_ = new CreditEvents(creditEventsNode); } } else { creditEvents_ = new CreditEvents(creditEventsNode); } } XmlNode creditEventsReferenceNode = xmlNode.SelectSingleNode("creditEventsReference"); if (creditEventsReferenceNode != null) { if (creditEventsReferenceNode.Attributes["href"] != null || creditEventsReferenceNode.Attributes["id"] != null) { if (creditEventsReferenceNode.Attributes["id"] != null) { creditEventsReferenceIDRef_ = creditEventsReferenceNode.Attributes["id"].Value; CreditEventsReference ob = new CreditEventsReference(creditEventsReferenceNode); IDManager.SetID(creditEventsReferenceIDRef_, ob); } else if (creditEventsReferenceNode.Attributes["href"] != null) { creditEventsReferenceIDRef_ = creditEventsReferenceNode.Attributes["href"].Value; } else { creditEventsReference_ = new CreditEventsReference(creditEventsReferenceNode); } } else { creditEventsReference_ = new CreditEventsReference(creditEventsReferenceNode); } } XmlNode triggerTypeNode = xmlNode.SelectSingleNode("triggerType"); if (triggerTypeNode != null) { if (triggerTypeNode.Attributes["href"] != null || triggerTypeNode.Attributes["id"] != null) { if (triggerTypeNode.Attributes["id"] != null) { triggerTypeIDRef_ = triggerTypeNode.Attributes["id"].Value; TriggerTypeEnum ob = new TriggerTypeEnum(triggerTypeNode); IDManager.SetID(triggerTypeIDRef_, ob); } else if (triggerTypeNode.Attributes["href"] != null) { triggerTypeIDRef_ = triggerTypeNode.Attributes["href"].Value; } else { triggerType_ = new TriggerTypeEnum(triggerTypeNode); } } else { triggerType_ = new TriggerTypeEnum(triggerTypeNode); } } XmlNode triggerTimeTypeNode = xmlNode.SelectSingleNode("triggerTimeType"); if (triggerTimeTypeNode != null) { if (triggerTimeTypeNode.Attributes["href"] != null || triggerTimeTypeNode.Attributes["id"] != null) { if (triggerTimeTypeNode.Attributes["id"] != null) { triggerTimeTypeIDRef_ = triggerTimeTypeNode.Attributes["id"].Value; TriggerTimeTypeEnum ob = new TriggerTimeTypeEnum(triggerTimeTypeNode); IDManager.SetID(triggerTimeTypeIDRef_, ob); } else if (triggerTimeTypeNode.Attributes["href"] != null) { triggerTimeTypeIDRef_ = triggerTimeTypeNode.Attributes["href"].Value; } else { triggerTimeType_ = new TriggerTimeTypeEnum(triggerTimeTypeNode); } } else { triggerTimeType_ = new TriggerTimeTypeEnum(triggerTimeTypeNode); } } }