Example #1
0
        public DomainStructure(XmlElement xml)
            : base(xml)
        {
            //this.LoadProperties(xml);
            SpecificData = XmlTool.LoadParameters(xml);
            FullName     = NameWithSchema.LoadFromXml(xml);
            DataType     = DbTypeBase.Load(xml);
            var defval = xml.FindElement("Default");

            if (defval != null)
            {
                DefaultValue = SqlExpression.Load(defval);
            }
        }
Example #2
0
 private void LoadFromXml(XmlElement xml, bool oldStyle)
 {
     LoadBase(xml);
     FullName = NameWithSchema.LoadFromXml(xml);
     if (oldStyle)
     {
         foreach (XmlElement child in xml)
         {
             var cnt = Constraint.FromXml(child, true);
             if (cnt != null)
             {
                 _Constraints.Add(cnt);
             }
             else if (child.Name == "Column")
             {
                 _Columns.Add(new ColumnStructure(child));
             }
         }
     }
     else
     {
         foreach (XmlElement child in xml.SelectNodes("Column"))
         {
             _Columns.Add(new ColumnStructure(child));
         }
         foreach (XmlElement child in xml.SelectNodes("Constraint"))
         {
             _Constraints.Add(Constraint.FromXml(child, false));
         }
     }
     SpecificData = XmlTool.LoadParameters(xml);
     if (xml.FindElement("Comment") != null)
     {
         Comment = xml.FindElement("Comment").InnerText;
     }
     if (xml.FindElement("FixedData") != null)
     {
         FixedData = new InMemoryTable(this, xml.FindElement("FixedData"));
     }
 }
Example #3
0
        public SpecificObjectStructure(XmlElement xml, string objtype)
            : base(xml)
        {
            this.LoadPropertiesCore(xml);
            ObjectType   = objtype;
            SpecificData = XmlTool.LoadParameters(xml);
            ObjectName   = NameWithSchema.LoadFromXml(xml);
            RelatedTable = NameWithSchema.LoadFromXml(xml, "relschema", "reltable");
            var deps = xml.FindElement("DependsOn");

            if (deps != null)
            {
                DependsOn = new List <DependencyItem>();
                foreach (XmlElement child in deps)
                {
                    var repr = SpecificRepresentationAddonType.Instance.FindByElement(child.Name);
                    DependsOn.Add(new DependencyItem {
                        Name = NameWithSchema.LoadFromXml(child), ObjectType = repr.ObjectType
                    });
                }
            }
        }
Example #4
0
 public ColumnReference(XmlElement xml)
 {
     this.LoadPropertiesCore(xml);
     SpecificData = XmlTool.LoadParameters(xml);
 }
Example #5
0
 public CollationStructure(XmlElement xml)
     : base(xml)
 {
     this.LoadPropertiesCore(xml);
     SpecificData = XmlTool.LoadParameters(xml);
 }
Example #6
0
 public SchemaStructure(XmlElement xml)
     : base(xml)
 {
     //this.LoadProperties(xml);
     SpecificData = XmlTool.LoadParameters(xml);
 }