public override XmlNode ToXml(XmlDocument doc) { XmlNode result = base.ToXml(doc); result.AppendChild(type.ToXml(doc)); XmlAttribute nameAttr = doc.CreateAttribute("Name"); nameAttr.Value = name; result.Attributes.Append(nameAttr); return(result); }
/// <summary> /// Toes the XML representation of node with the all its chils. /// </summary> /// <param name="doc">The parent XML document</param> /// <returns>The XML Node.</returns> public override XmlNode ToXml(XmlDocument doc) { XmlNode result = base.ToXml(doc); XmlNode node = doc.CreateElement("TargetType"); node.AppendChild(castingTypeNode.ToXml(doc)); result.AppendChild(node); node = doc.CreateElement("CastExpression"); node.AppendChild(innerExpression.ToXml(doc)); result.AppendChild(node); return(result); }
public override XmlNode ToXml(XmlDocument doc) { XmlNode result = base.ToXml(doc); XmlNode node = doc.CreateElement("ReturnType"); node.AppendChild(returnType.ToXml(doc)); result.AppendChild(node); XmlAttribute nameAttr = doc.CreateAttribute("Name"); nameAttr.Value = name; result.Attributes.Append(nameAttr); result.AppendChild(args.ToXml(doc)); node = doc.CreateElement("Body"); node.AppendChild(body.ToXml(doc)); result.AppendChild(node); return(result); }
public override XmlNode ToXml(XmlDocument doc) { XmlNode result = base.ToXml(doc); result.AppendChild(type.ToXml(doc)); XmlNode ids = doc.CreateElement("Variables"); result.AppendChild(ids); for (int i = 0; i < Count; i++) { XmlNode var = IdList[i].ToXml(doc); ids.AppendChild(var); Expression init = InitList[i]; if (init == null) { continue; } XmlNode initNode = doc.CreateElement("Initialization"); initNode.AppendChild(init.ToXml(doc)); var.AppendChild(initNode); } return(result); }