public void OnWriteToXmlNode(IXmlCodeWriter serializer, XmlNode node) { if (_qryParams != null) { _qryParams.OnWriteToXmlNode(serializer, node); } }
public static XmlNode WriteToChildXmlNode(IXmlCodeWriter serializer, XmlNode nodeParent, string name, IXmlNodeSerializable obj) { if (nodeParent == null) { if (string.IsNullOrEmpty(name)) { throw new XmlSerializationException("Cannot call WriteToChildXmlNode with a null nodeParent and empty child name."); } else { throw new XmlSerializationException("Cannot call WriteToChildXmlNode with a null nodeParent. child name=" + name); } } if (string.IsNullOrEmpty(name)) { throw new XmlSerializationException("Cannot call WriteToChildXmlNode with a null child name. nodeParent=" + nodeParent.Name); } if (obj == null) { throw new XmlSerializationException("Cannot call WriteToChildXmlNode with a null object. nodeParent=" + nodeParent.Name + ", child name=" + name); } XmlNode node = nodeParent.OwnerDocument.CreateElement(name); nodeParent.AppendChild(node); WriteToXmlNode(serializer, obj, node); return(node); }
public override void OnWriteToXmlNode(IXmlCodeWriter writer, XmlNode node) { base.OnWriteToXmlNode(writer, node); XmlNode ndDim = node.SelectSingleNode(XML_Rank); if (ndDim == null) { ndDim = node.OwnerDocument.CreateElement(XML_Rank); node.AppendChild(ndDim); } else { ndDim.RemoveAll(); } if (_sizes == null || _sizes.Length == 0) { _sizes = new int[1]; _sizes[0] = 0; } for (int i = 0; i < _sizes.Length; i++) { XmlNode nd = ndDim.OwnerDocument.CreateElement(XmlTags.XML_Item); ndDim.AppendChild(nd); XmlUtil.SetAttribute(nd, XMLATT_Dim, _sizes[i]); } }
public virtual void OnWriteToXmlNode(IXmlCodeWriter serializer, XmlNode node) { if (!string.IsNullOrEmpty(_name)) { XmlSerialization.SetAttribute(node, XmlSerialization.XMLATT_NAME, _name); } XmlSerialization.SetAttribute(node, XmlSerialization.XMLATT_ID, this.MethodID); XmlSerialization.SetAttribute(node, XmlSerialization.XMLATT_STATIC, _static.ToString()); XmlSerialization.SetAttribute(node, XmlSerialization.XMLATT_UIThreadSafe, this.MakeUIThreadSafe); if (!string.IsNullOrEmpty(_desc)) { XmlSerialization.WriteValueToChildNode(node, XmlSerialization.XML_DESCRIPT, _desc); } if (_returnType != null) { XmlSerialization.WriteToChildXmlNode(serializer, node, XmlSerialization.XML_RETURNTYPE, _returnType); } if (_parameters != null && _parameters.Length > 0) { XmlNode nodePS = node.OwnerDocument.CreateElement(XmlSerialization.XML_PARAMLIST); node.AppendChild(nodePS); for (int i = 0; i < _parameters.Length; i++) { XmlSerialization.WriteToChildXmlNode(serializer, nodePS, XmlSerialization.XML_PARAM, _parameters[i]); } } }
public void OnWriteToXmlNode(IXmlCodeWriter serializer, XmlNode node) { XmlUtil.SetNameAttribute(node, Name); XmlNode valNode = XmlUtil.CreateSingleNewElement(node, XmlTags.XML_Object); serializer.WriteObjectToNode(valNode, Value); }
public void OnWriteToXmlNode(IXmlCodeWriter writer, XmlNode node) { XmlUtil.SetAttribute(node, XmlTags.XMLATT_MethodID, MethodId); XmlUtil.SetAttribute(node, XmlTags.XMLATT_ActionID, BranchId); XmlUtil.SetAttribute(node, XmlTags.XMLATT_NAME, ParameterName); XmlUtil.SetAttribute(node, XmlTags.XMLATT_ParamId, ParameterId); }
public override void OnWriteToXmlNode(IXmlCodeWriter serializer, XmlNode node) { base.OnWriteToXmlNode(serializer, node); #if NET35 if (string.IsNullOrEmpty(src)) #else if (string.IsNullOrWhiteSpace(src)) #endif { XmlUtil.RemoveAttribute(node, XMLATT_src); } else { XmlUtil.SetAttribute(node, XMLATT_src, src); } #if NET35 if (string.IsNullOrEmpty(usemap)) #else if (string.IsNullOrWhiteSpace(usemap)) #endif { XmlUtil.RemoveAttribute(node, XMLATT_usemap); } else { XmlUtil.SetAttribute(node, XMLATT_usemap, usemap); } }
public virtual WriteResult WriteToXmlNode(XmlNode parentXmlNode, IXmlCodeWriter writer) { //create XmlNode GenerateXmlNode(parentXmlNode); //write properties WriteResult ret = writer.WriteObjectToNode(_xmlNode, this); //write sub-nodes,shortcuts and values if (this.NextLevelLoaded) { foreach (TreeNode tn in Nodes) { TreeNodeX tnx = tn as TreeNodeX; if (tnx != null) { if (tnx.WriteToXmlNode(_xmlNode, writer) == WriteResult.WriteFail) { ret = WriteResult.WriteFail; } } else { TreeNodeValue tnv = tn as TreeNodeValue; if (tnv != null) { if (tnv.WriteToXmlNode(_xmlNode, writer) == WriteResult.WriteFail) { ret = WriteResult.WriteFail; } } } } } return(ret); }
public void OnWriteToXmlNode(IXmlCodeWriter serializer, XmlNode node) { XmlUtil.SetAttribute(node, XMLATT_ServiceName, ServiceName); XmlUtil.SetAttribute(node, XMLATT_ServicePort, BasePort); XmlUtil.SetAttribute(node, XMLATT_wsPort, WsHttpPort); XmlUtil.SetAttribute(node, XMLATT_tcpPort, TcpPort); }
public void OnWriteToXmlNode(IXmlCodeWriter serializer, XmlNode node) { XmlNode psNode = XmlUtil.CreateSingleNewElement(node, XML_QryParams); psNode.RemoveAll(); _links.OnWriteToXmlNode(serializer, psNode); }
public override void OnWriteToXmlNode(IXmlCodeWriter writer, XmlNode node) { base.OnWriteToXmlNode(writer, node); //write event icons if (_events != null && _events.Count > 0) { XmlNode nodeEvents = XmlUtil.CreateSingleNewElement(node, XML_EVENTS); foreach (EventIcon ei in _events) { XmlNode eNode = nodeEvents.OwnerDocument.CreateElement(XmlTags.XML_Item); nodeEvents.AppendChild(eNode); ei.WriteToXmlNode((XmlObjectWriter)writer, eNode); } } //write input ports if (_inPortList != null && _inPortList.Count > 0) { XmlNode portsNode = XmlUtil.CreateSingleNewElement(node, XML_INPORTS); foreach (EventPortIn port in _inPortList) { XmlNode pNode = portsNode.OwnerDocument.CreateElement(XmlTags.XML_Item); portsNode.AppendChild(pNode); port.OnWriteToXmlNode(writer, pNode); } } }
public void SetWriter(IXmlCodeWriter writer) { if (writer != null) { _writer = writer; } }
public override void OnWriteToXmlNode(IXmlCodeWriter serializer, XmlNode node) { base.OnWriteToXmlNode(serializer, node); XmlNode nd = XmlUtil.CreateSingleNewElement(node, XML_OwnerType); XmlUtil.SetLibTypeAttribute(nd, _type); }
public override void OnWriteToXmlNode(IXmlCodeWriter writer, XmlNode node) { base.OnWriteToXmlNode(writer, node); XmlNode nd = XmlUtil.CreateSingleNewElement(node, NAME); XmlUtil.SetNameAttribute(nd, Name); XmlUtil.SetAttribute(nd, ID, ParameterID); }
public void OnWriteToXmlNode(IXmlCodeWriter serializer, XmlNode node) { if (this.Columns != null && this.Columns.Count > 0) { XmlNode nd = XmlUtil.CreateSingleNewElement(node, XML_Columns); serializer.WriteObjectToNode(nd, this.Columns); } }
public void OnWriteToXmlNode(IXmlCodeWriter writer, XmlNode node) { if (_methodPointer != null) { writer.WriteObjectToNode(node, _methodPointer); } XmlUtil.SetAttribute(node, XmlTags.XMLATT_NodeId, ID); }
public void OnWriteToXmlNode(IXmlCodeWriter serializer, XmlNode node) { if (_data != null) { XmlNode dataNode = XmlUtil.CreateSingleNewElement(node, XmlTags.XML_Data); _data.WriteToXmlNode(serializer, dataNode); } }
public void OnWriteToXmlNode(IXmlCodeWriter writer, XmlNode node) { XmlUtil.SetAttribute(node, XmlTags.XMLATT_ClassID, ClassId); XmlUtil.SetAttribute(node, XmlTags.XMLATT_ComponentID, MemberId); // OnWrite(writer, node); // }
public virtual void OnWriteToXmlNode(IXmlCodeWriter serializer, XmlNode node) { XmlSerialization.WriteValueToChildNode(node, XML_Location, _location); if (NeedSaveSize) { XmlSerialization.WriteValueToChildNode(node, XML_Size, this.Size); } }
public void OnWriteToXmlNode(IXmlCodeWriter serializer, XmlNode node) { if (_value != null) { XmlNode data = XmlUtil.CreateSingleNewElement(node, XmlTags.XML_Data); serializer.WriteObjectToNode(data, _value); } }
public override void OnWriteToXmlNode(IXmlCodeWriter serializer, XmlNode node) { base.OnWriteToXmlNode(serializer, node); if (_data != null) { XmlSerialization.WriteValueToChildNode(node, "Value", _data); } }
public override void OnWriteToXmlNode(IXmlCodeWriter serializer, XmlNode node) { _writer = serializer; base.OnWriteToXmlNode(serializer, node); if (_label != null) { XmlSerialization.WriteToUniqueChildXmlNode(serializer, node, XML_LABEL, _label); } }
public override void OnWriteToXmlNode(IXmlCodeWriter serializer, XmlNode node) { _writer = serializer; base.OnWriteToXmlNode(serializer, node); if (_entity != null) { XmlSerialization.WriteToUniqueChildXmlNode(serializer, node, XML_ENTITY, _entity); } }
protected override void OnWrite(IXmlCodeWriter writer, XmlNode dataNode) { CustomMethodReturnPointer v = this.ClassPointer as CustomMethodReturnPointer; if (v != null) { v.OnWriteToXmlNode(writer, dataNode); } }
public void OnWriteToXmlNode(IXmlCodeWriter serializer, XmlNode node) { if (_action != null) { _action.ActionId = 0; XmlNode actNode = XmlUtil.CreateSingleNewElement(node, XmlTags.XML_ACTION); serializer.WriteObjectToNode(actNode, _action); } }
public void OnWriteToXmlNode(IXmlCodeWriter writer, XmlNode node) { if (_valuePointer != null) { XmlNode nd = node.OwnerDocument.CreateElement(XmlTags.XML_PROPERTY); node.AppendChild(nd); writer.WriteObjectToNode(nd, _valuePointer); } }
public void OnWriteToXmlNode(IXmlCodeWriter serializer, XmlNode node) { for (int i = 0; i < this.Count; i++) { XmlNode itemNode = node.OwnerDocument.CreateElement(XmlTags.XML_Item); node.AppendChild(itemNode); serializer.WriteObjectToNode(itemNode, this[i]); } }
public override void OnWriteToXmlNode(IXmlCodeWriter serializer, XmlNode node) { base.OnWriteToXmlNode(serializer, node); XmlSerialization.WriteValueToChildNode(node, XML_RelativePosition, _relativePosition.Location); XmlNode nd = node.SelectSingleNode(XML_RelativePosition); XmlSerialization.SetAttribute(nd, "xTo0", _relativePosition.IsXto0); XmlSerialization.SetAttribute(nd, "yTo0", _relativePosition.IsYto0); }
public override void OnWriteToXmlNode(IXmlCodeWriter writer, XmlNode node) { base.OnWriteToXmlNode(writer, node); XmlUtil.SetAttribute(node, XMLATT_FromBase, UseBaseValue); PropertyOverride po = (PropertyOverride)Property; XmlUtil.SetAttribute(node, XMLATT_BaseClassId, po.BaseClassId); XmlUtil.SetAttribute(node, XMLATT_BasePropId, po.BasePropertyId); }
public void OnWriteToXmlNode(IXmlCodeWriter serializer, XmlNode node) { if (_method != null) { XmlNode dataNode = XmlUtil.CreateSingleNewElement(node, XmlTags.XML_Data); _method.OnWriteToXmlNode(serializer, dataNode); } //serializer.WriteObjectToNode(dataNode, _method); }