Mono.Debugger.SourceLocation.GetSessionData C# (CSharp) Method

GetSessionData() private method

private GetSessionData ( XmlElement root ) : void
root System.Xml.XmlElement
return void
        internal void GetSessionData(XmlElement root)
        {
            XmlElement name_e = root.OwnerDocument.CreateElement ("Name");
            name_e.InnerText = Name;
            root.AppendChild (name_e);

            if (Module != null) {
                XmlElement module_e = root.OwnerDocument.CreateElement ("Module");
                module_e.InnerText = Module;
                root.AppendChild (module_e);
            }

            if (Method != null) {
                XmlElement method_e = root.OwnerDocument.CreateElement ("Method");
                method_e.InnerText = Method;
                root.AppendChild (method_e);
            }

            if (FileName != null) {
                XmlElement file_e = root.OwnerDocument.CreateElement ("File");
                file_e.InnerText = FileName;
                root.AppendChild (file_e);
            }

            if (Line > 0) {
                XmlElement line_e = root.OwnerDocument.CreateElement ("Line");
                line_e.InnerText = Line.ToString ();
                root.AppendChild (line_e);
            }

            if (Column > 0) {
                XmlElement col_e = root.OwnerDocument.CreateElement ("Column");
                col_e.InnerText = Column.ToString ();
                root.AppendChild (col_e);
            }
        }

Usage Example

		protected override void GetSessionData (XmlElement root, XmlElement element)
		{
			XmlElement location_e = root.OwnerDocument.CreateElement ("Location");
			location_e.SetAttribute ("name", location.Name);
			element.AppendChild (location_e);

			location.GetSessionData (location_e);
		}