コード例 #1
0
        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);
        }
コード例 #2
0
ファイル: MethodModel.cs プロジェクト: savionak/SPP_3
        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);
        }