public XmlElement ToXML(XmlDocument doc) { XmlElement elem = doc.CreateElement("funcRef"); if (Definition != null) { elem.SetAttribute("sfPath", Definition.SF.SFPath); elem.SetAttribute("name", Definition.Name); } else if (_sfDefinition != null) { elem.SetAttribute("sfPath", _sfDefinition.SFPath); elem.SetAttribute("name", _name); } else { throw new InvalidOperationException(); } elem.SetAttribute("charIndex", CharIndex.ToString()); elem.SetAttribute("charLength", CharLength.ToString()); elem.SetAttribute("codePart", CodePart); elem.SetAttribute("isCall", (Arguments != null).ToString()); if (Arguments != null) { foreach (FuncRefArgInfo funcArgRef in Arguments) { elem.AppendChild(funcArgRef.ToXML(doc)); } } return(elem); }
public XmlElement ToXML(XmlDocument doc) { XmlElement elem = doc.CreateElement("usingRef"); if (Definition != null) { elem.SetAttribute("sfPath", Definition.SF.SFPath); elem.SetAttribute("name", Definition.Name); } else if (_sfDefinition != null) { elem.SetAttribute("sfPath", _sfDefinition.SFPath); elem.SetAttribute("name", _name); } else { throw new InvalidOperationException(); } elem.SetAttribute("charIndex", CharIndex.ToString()); elem.SetAttribute("charLength", CharLength.ToString()); elem.SetAttribute("codePart", CodePart); return(elem); }
public XmlElement ToXML(XmlDocument doc) { XmlElement argElem = doc.CreateElement("funcRefArg"); argElem.SetAttribute("charIndex", CharIndex.ToString()); argElem.SetAttribute("charLength", CharLength.ToString()); return(argElem); }