private void parseParameter(Parameter p, XmlElement parent, XmlDocument doc) { XmlElement element; //node.Value = pair.Key; if (p.Primitive) { element = doc.CreateElement(p.getTypeName()); element.SetAttribute("Name", p.Name); //element.SetAttribute("Type", p.getTypeName()); element.SetAttribute("Default", p.getDefaultValues()); XmlElement value = doc.CreateElement("DefaultValue"); element.AppendChild(value); } else { element = doc.CreateElement(p.getTypeName()); NonPrimitiveParameter np = p as NonPrimitiveParameter; element.SetAttribute("Name", p.Name); //element.SetAttribute("Type", p.getTypeName()); foreach (Parameter subP in np.SubParameters) { parseParameter(subP, element, doc); } } parent.AppendChild(element); }
//public SequenceParameter(String name) :base(name) //{ //} public SequenceParameter(String name, Parameter entryType) : base(name) { m_parameter = entryType; m_parameterType = entryType.GetType(); //m_parameters.Add(m_parameter); }
private void parseParameter(Parameter p, XmlElement parent, XmlDocument doc) { XmlElement element; if (p.Primitive) { element = doc.CreateElement(p.getTypeName()); element.SetAttribute("Name", p.Name); element.SetAttribute("Default", p.getDefaultValues()); element.SetAttribute("Count", p.Count.ToString()); XmlElement value = doc.CreateElement("DefaultValue"); element.AppendChild(value); } else { element = doc.CreateElement(p.getTypeName()); NonPrimitiveParameter np = p as NonPrimitiveParameter; element.SetAttribute("Name", p.Name); //element.SetAttribute("Type", p.getTypeName()); if (p is CompoundParameter) { foreach (Parameter subP in np.SubParameters) { parseParameter(subP, element, doc); } } else if (p is SequenceParameter) { SequenceParameter seq = p as SequenceParameter; parseParameter(seq.Parameter, element, doc); } } parent.AppendChild(element); }
public void addParameter(Parameter parameter) { m_parameters[parameter.Name] = parameter; }
public void addParameter(Parameter parameter) { m_currentSequence.Root.addParameter(parameter); }