public XmlElement GetElement(XmlDocument document) { XmlElement element = document.CreateElement("method"); element.SetAttribute("name", Name); element.SetAttribute("time", Time.ToString()); element.SetAttribute("package", Package); element.SetAttribute("params", ParamsCount.ToString()); foreach (var child in ChildMethods) { element.AppendChild(child.GetElement(document)); } return(element); }
public XmlElement ToXmlElement(XmlDocument document) { XmlElement result = document.CreateElement(XmlConstants.MethodTag); result.SetAttribute(XmlConstants.NameAttribute, Name); result.SetAttribute(XmlConstants.TimeAttribute, Time.ToString()); result.SetAttribute(XmlConstants.PackageAttribute, Package); result.SetAttribute(XmlConstants.ParamsAttribute, ParamsCount.ToString()); foreach (var child in NestedMethods) { result.AppendChild(child.ToXmlElement(document)); } return(result); }