public static ParameterOption CreateOption(XmlElement xmlElem) { ParameterOption obj = new ParameterOption(); obj.Load(xmlElem); return(obj); }
public void Load(XmlElement xmlElem) { this.parameterType = (ParameterType)Enum.Parse(typeof(ParameterType), xmlElem.GetAttribute("type")); XmlNodeList nodes = xmlElem.ChildNodes; for (int i = 0; i < nodes.Count; i++) { XmlNode node = nodes[i]; if (node is XmlElement) { XmlElement elem = (XmlElement)node; this.options.Add(ParameterOption.CreateOption(elem)); } } }