nHydrate.Generator.Models.Relation.XmlAppend C# (CSharp) Method

XmlAppend() public method

public XmlAppend ( XmlNode node ) : void
node System.Xml.XmlNode
return void
        public override void XmlAppend(XmlNode node)
        {
            var oDoc = node.OwnerDocument;

            XmlHelper.AddAttribute(node, "key", this.Key);
            XmlHelper.AddAttribute(node, "enforce", this.Enforce);

            if (this.Description != _def_description)
                XmlHelper.AddAttribute(node, "description", this.Description);

            var columnRelationshipsNode = oDoc.CreateElement("crl");
            ColumnRelationships.XmlAppend(columnRelationshipsNode);
            node.AppendChild(columnRelationshipsNode);

            var childTableRefNode = oDoc.CreateElement("ct");
            if (this.ChildTableRef != null)
                this.ChildTableRef.XmlAppend(childTableRefNode);
            node.AppendChild(childTableRefNode);

            var parentTableRefNode = oDoc.CreateElement("pt");
            if (this.ParentTableRef != null)
                this.ParentTableRef.XmlAppend(parentTableRefNode);
            node.AppendChild(parentTableRefNode);

            XmlHelper.AddAttribute(node, "id", this.Id);
            if (this.RoleName != _def_roleName)
                XmlHelper.AddAttribute(node, "roleName", this.RoleName);
            if (this.ConstraintName != _def_constraintname)
                XmlHelper.AddAttribute(node, "constraintName", this.ConstraintName);
            //XmlHelper.AddAttribute(node, "createdDate", _createdDate.ToString("yyyy-MM-dd HH:mm:ss", System.Globalization.CultureInfo.InvariantCulture));
        }