Exemplo n.º 1
0
        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);
        }
Exemplo n.º 2
0
 //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);
 }
Exemplo n.º 3
0
        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);
        }
Exemplo n.º 4
0
 public void addParameter(Parameter parameter)
 {
     m_parameters[parameter.Name] = parameter;
 }
Exemplo n.º 5
0
 public void addParameter(Parameter parameter)
 {
     m_currentSequence.Root.addParameter(parameter);
 }