Esempio n. 1
0
        //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);
        }
Esempio n. 2
0
 public void SaveCommon(XmlElement xml)
 {
     SaveBase(xml);
     if (Name != null)
     {
         xml.SetAttribute("name", Name);
     }
     XmlTool.SaveSpecificAttributes(SpecificData, "specific.", xml);
 }
Esempio n. 3
0
 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"));
     }
 }