//public static bool EqualsTypes(DbTypeBase a, DbTypeBase b) //{ // if (a.GetType() != b.GetType()) return false; // MemoryStream sa = new MemoryStream(), sb = new MemoryStream(); // XmlTool.SerializeObject(sa, a); // XmlTool.SerializeObject(sb, b); // byte[] ma = sa.ToArray(), mb = sb.ToArray(); // if (!ArrayTool.EqualsArrays(ma, mb)) return false; // return true; //} public virtual void SaveToXml(XmlElement xml) { xml.SetAttribute("datatype", Code.ToString().ToLower()); //if (ArraySpec.IsArray) xml.SetAttribute("array", ArraySpec.ToString()); XmlTool.SaveSpecificAttributes(SpecificData, "typespec.", xml); XmlTool.SaveProperties(this, xml); }
public void SaveCommon(XmlElement xml) { SaveBase(xml); if (Name != null) { xml.SetAttribute("name", Name); } XmlTool.SaveSpecificAttributes(SpecificData, "specific.", xml); }
private void SaveInternal(XmlElement xml) { m_dataType.SaveToXml(xml); XmlTool.SaveSpecificAttributes(SpecificData, "colspec.", xml); if (Domain != null) { Domain.SaveToXml(xml, "domain."); } if (m_defaultValue != null) { m_defaultValue.SaveToXml(xml.AddChild("Default")); } }