public override void Save(XmlElement parentXml) { XmlElement xml = XmlTool.AddChild(parentXml, "Check"); //xml.SetAttribute("expr", Expression); SaveCommon(xml); }
public void Save(XmlElement xml) { if (Dialect != null) { xml.SetAttribute("dialect", XmlTool.ValueToString(typeof(ISqlDialect), Dialect)); } if (ForceSingleSchema) { xml.SetAttribute("singleschema", "1"); } SaveBase(xml); foreach (TableStructure table in Tables) { XmlElement tx = XmlTool.AddChild(xml, "Table"); table.Save(tx); } foreach (string objtype in SpecificObjects.Keys) { ISpecificRepresentation repr = SpecificRepresentationAddonType.Instance.FindRepresentation(objtype); foreach (SpecificObjectStructure obj in SpecificObjects[objtype]) { XmlElement tx = XmlTool.AddChild(xml, repr.XmlElementName ?? "Specific"); if (repr.XmlElementName == null) { tx.SetAttribute("objtype", objtype); } obj.Save(tx); } } foreach (DomainStructure dom in Domains) { XmlElement dx = XmlTool.AddChild(xml, "Domain"); dom.Save(dx); } }
public override void Save(XmlElement parentXml) { XmlElement xml = XmlTool.AddChild(parentXml, "Unique"); SaveColumns(xml); SaveCommon(xml); }
public override void Save(XmlElement parentXml) { XmlElement xml = XmlTool.AddChild(parentXml, "ForeignKey"); SaveColumns(xml); SaveFkData(xml); SaveCommon(xml); }
public override void SaveToXml(XmlElement xml) { base.SaveToXml(xml); foreach (var cmd in m_commands) { cmd.SaveToXml(XmlTool.AddChild(xml, "Command")); } }
private static void SaveProperty <T>(PropertyInfo prop, object target, object diffBase, XmlElement xml, Func <T, string> getvalue) { if (!prop.CallGet(target).Equals(prop.CallGet(diffBase))) { object value = prop.CallGet(target); XmlElement fld = XmlTool.AddChild(xml, "Property"); fld.SetAttribute("name", prop.Name); fld.SetAttribute("value", getvalue((T)value)); } }
public override void SaveToXml(XmlElement xml) { base.SaveToXml(xml); xml.SetAttribute("type", "bulkcopy"); m_source.SaveToXml(XmlTool.AddChild(xml, "Source")); m_target.SaveToXml(XmlTool.AddChild(xml, "Target")); if (m_transform == null) { xml.AppendChild(xml.OwnerDocument.ImportNode(m_transformXml, true)); } else { m_transform.SaveToXml(XmlTool.AddChild(xml, "Transform")); } m_copyOptions.SaveToXml(xml.AddChild("CopyOptions")); }
private void SaveToXml(XmlElement xml, bool oldStyle) { SaveBase(xml); if (FullName != null) { FullName.SaveToXml(xml); } foreach (ColumnStructure col in Columns) { XmlElement cx = XmlTool.AddChild(xml, "Column"); col.Save(cx); } if (oldStyle) { foreach (DatAdmin.Constraint cnt in Constraints) { cnt.Save(xml); } } else { foreach (DatAdmin.Constraint cnt in Constraints) { XmlElement cx = XmlTool.AddChild(xml, "Constraint"); cnt.SaveToXml(cx); } } XmlTool.SaveParameters(xml, SpecificData); if (!String.IsNullOrEmpty(Comment)) { xml.AddChild("Comment").InnerText = Comment; } if (FixedData != null) { FixedData.SaveToXml(xml.AddChild("FixedData")); } }