protected override void OnSave(XmlNode node)
 {
     base.OnSave(node);
     if (_value == null)
     {
         _value = new ObjectRef(null);
     }
     XmlSerialization.WriteToChildXmlNode(GetWriter(), node, "ObjRef", _value);
 }
 /// <summary>
 /// the base does nothing, so it is not called
 /// </summary>
 /// <param name="node"></param>
 protected override void OnSave(XmlNode node)
 {
     XmlSerialization.SetAttribute(node, XmlSerialization.XMLATT_NAME, _value);
     XmlSerialization.SetAttribute(node, "subscript", _subscript);
     XmlSerialization.SetAttribute(node, "asInport", _isInPort);
     if (_typeDefined)
     {
         XmlSerialization.SetAttribute(node, "typeDefined", "true");
     }
     XmlSerialization.SetAttribute(node, XmlSerialization.XMLATT_ID, ID.ToString());
     XmlSerialization.WriteToChildXmlNode(GetWriter(), node, "ValueType", DataType);
     SavePorts(node);
 }
        public void SavePorts(XmlNode node)
        {
            IXmlCodeWriter w = GetWriter();

            if (_inport != null)
            {
                XmlSerialization.WriteToChildXmlNode(w, node, XmlSerialization.XML_PORT, _inport);
            }
            if (_outports != null)
            {
                for (int i = 0; i < _outports.Length; i++)
                {
                    XmlSerialization.WriteToChildXmlNode(w, node, XmlSerialization.XML_PORT, _outports[i]);
                }
            }
        }
예제 #4
0
 protected override void OnSave(XmlNode node)
 {
     XmlSerialization.WriteToChildXmlNode(GetWriter(), node, XmlSerialization.XML_METHODREF, _methodRef);
 }
 protected override void OnSave(XmlNode node)
 {
     XmlSerialization.WriteToChildXmlNode(GetWriter(), node, "ValueType", _dataType);
     XmlSerialization.WriteValueToChildNode(node, "Value", _value);
 }