Example #1
0
 public override void LoadFromXml(XmlElement xml)
 {
     base.LoadFromXml(xml);
     foreach (XmlElement child in xml.SelectNodes("Constraint"))
     {
         var cnt = Constraint.FromXml(child, false);
         if (cnt != null)
         {
             RelatedConstraints.Add(cnt);
         }
     }
 }
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 override void LoadFromXml(XmlElement xml)
 {
     base.LoadFromXml(xml);
     Constraint = Constraint.FromXml(xml.FindElement("Constraint"), false);
 }