Free cookie consent management tool by TermsFeed Policy Generator

Ignore:
Timestamp:
04/14/08 21:51:15 (17 years ago)
Author:
gkronber
Message:

created a branch that uses XmlTextReader instead of XMLDocument to load documents. Investigating ticket #103. (...work in progress!)

Location:
branches/XmlTextReaderBranch
Files:
60 edited
2 copied

Legend:

Unmodified
Added
Removed
  • branches/XmlTextReaderBranch/HeuristicLab.Constraints/AllSubOperatorsTypeConstraint.cs

    r2 r121  
    9292    }
    9393
    94     public override void Populate(XmlNode node, IDictionary<Guid,IStorable> restoredObjects) {
    95       base.Populate(node, restoredObjects);
    96       groupConstraint = (SubOperatorTypeConstraint)PersistenceManager.Restore(node.SelectSingleNode("SubOperatorsGroupConstraint"), restoredObjects);
     94    //public override void Populate(XmlNode node, IDictionary<Guid, IStorable> restoredObjects) {
     95    //  base.Populate(node, restoredObjects);
     96    //  groupConstraint = (SubOperatorTypeConstraint)PersistenceManager.Restore(node.SelectSingleNode("SubOperatorsGroupConstraint"), restoredObjects);
     97    //}
     98    public override void Populate(XmlReader reader, IDictionary<Guid, IStorable> restoredObjects) {
     99      base.Populate(reader, restoredObjects);
     100      groupConstraint = (SubOperatorTypeConstraint)PersistenceManager.Restore(reader, "SubOperatorsGroupConstraint", restoredObjects);
    97101    }
    98102    #endregion persistence
  • branches/XmlTextReaderBranch/HeuristicLab.Constraints/AndConstraint.cs

    r40 r121  
    8181    }
    8282
    83     public override void Populate(XmlNode node, IDictionary<Guid,IStorable> restoredObjects) {
    84       base.Populate(node, restoredObjects);
    85       clauses = (ItemList<IConstraint>)PersistenceManager.Restore(node.SelectSingleNode("Clauses"), restoredObjects);
     83    //public override void Populate(XmlNode node, IDictionary<Guid,IStorable> restoredObjects) {
     84    //  base.Populate(node, restoredObjects);
     85    //  clauses = (ItemList<IConstraint>)PersistenceManager.Restore(node.SelectSingleNode("Clauses"), restoredObjects);
     86    //}
     87    public override void Populate(XmlReader reader, IDictionary<Guid, IStorable> restoredObjects) {
     88      base.Populate(reader, restoredObjects);
     89      clauses = (ItemList<IConstraint>)PersistenceManager.Restore(reader, "Clauses", restoredObjects);
    8690    }
    8791    #endregion persistence
  • branches/XmlTextReaderBranch/HeuristicLab.Constraints/DoubleBoundedConstraint.cs

    r2 r121  
    155155    }
    156156
    157     public override void Populate(XmlNode node, IDictionary<Guid, IStorable> restoredObjects) {
    158       base.Populate(node, restoredObjects);
    159       lowerBound = double.Parse(node.Attributes["LowerBound"].Value);
    160       if (node.Attributes["LowerBoundIncluded"] != null) {
    161         lowerBoundIncluded = bool.Parse(node.Attributes["LowerBoundIncluded"].Value);
     157    //public override void Populate(XmlNode node, IDictionary<Guid, IStorable> restoredObjects) {
     158    //  base.Populate(node, restoredObjects);
     159    //  lowerBound = double.Parse(node.Attributes["LowerBound"].Value);
     160    //  if(node.Attributes["LowerBoundIncluded"] != null) {
     161    //    lowerBoundIncluded = bool.Parse(node.Attributes["LowerBoundIncluded"].Value);
     162    //  } else {
     163    //    lowerBoundIncluded = true;
     164    //  }
     165    //  if(node.Attributes["LowerBoundEnabled"] != null) {
     166    //    lowerBoundEnabled = bool.Parse(node.Attributes["LowerBoundEnabled"].Value);
     167    //  } else {
     168    //    lowerBoundEnabled = true;
     169    //  }
     170
     171    //  upperBound = double.Parse(node.Attributes["UpperBound"].Value);
     172    //  if(node.Attributes["UpperBoundIncluded"] != null) {
     173    //    upperBoundIncluded = bool.Parse(node.Attributes["UpperBoundIncluded"].Value);
     174    //  } else {
     175    //    upperBoundIncluded = true;
     176    //  }
     177    //  if(node.Attributes["UpperBoundEnabled"] != null) {
     178    //    upperBoundEnabled = bool.Parse(node.Attributes["UpperBoundEnabled"].Value);
     179    //  } else {
     180    //    upperBoundEnabled = true;
     181    //  }
     182    //}
     183    public override void Populate(XmlReader reader, IDictionary<Guid, IStorable> restoredObjects) {
     184      base.Populate(reader, restoredObjects);
     185      lowerBound = double.Parse(reader["LowerBound"]);
     186      if(reader["LowerBoundIncluded"] != null) {
     187        lowerBoundIncluded = bool.Parse(reader["LowerBoundIncluded"]);
    162188      } else {
    163189        lowerBoundIncluded = true;
    164190      }
    165       if (node.Attributes["LowerBoundEnabled"] != null) {
    166         lowerBoundEnabled = bool.Parse(node.Attributes["LowerBoundEnabled"].Value);
     191      if(reader["LowerBoundEnabled"] != null) {
     192        lowerBoundEnabled = bool.Parse(reader["LowerBoundEnabled"]);
    167193      } else {
    168194        lowerBoundEnabled = true;
    169195      }
    170196
    171       upperBound = double.Parse(node.Attributes["UpperBound"].Value);
    172       if (node.Attributes["UpperBoundIncluded"] != null) {
    173         upperBoundIncluded = bool.Parse(node.Attributes["UpperBoundIncluded"].Value);
     197      upperBound = double.Parse(reader["UpperBound"]);
     198      if(reader["UpperBoundIncluded"] != null) {
     199        upperBoundIncluded = bool.Parse(reader["UpperBoundIncluded"]);
    174200      } else {
    175201        upperBoundIncluded = true;
    176202      }
    177       if (node.Attributes["UpperBoundEnabled"] != null) {
    178         upperBoundEnabled = bool.Parse(node.Attributes["UpperBoundEnabled"].Value);
     203      if(reader["UpperBoundEnabled"] != null) {
     204        upperBoundEnabled = bool.Parse(reader["UpperBoundEnabled"]);
    179205      } else {
    180206        upperBoundEnabled = true;
  • branches/XmlTextReaderBranch/HeuristicLab.Constraints/IntBoundedConstraint.cs

    r2 r121  
    150150    }
    151151
    152     public override void Populate(XmlNode node, IDictionary<Guid, IStorable> restoredObjects) {
    153       base.Populate(node, restoredObjects);
    154       lowerBound = int.Parse(node.Attributes["LowerBound"].Value);
    155       if (node.Attributes["LowerBoundIncluded"] != null) {
    156         lowerBoundIncluded = bool.Parse(node.Attributes["LowerBoundIncluded"].Value);
     152    //public override void Populate(XmlNode node, IDictionary<Guid, IStorable> restoredObjects) {
     153    //  base.Populate(node, restoredObjects);
     154    //  lowerBound = int.Parse(node.Attributes["LowerBound"].Value);
     155    //  if (node.Attributes["LowerBoundIncluded"] != null) {
     156    //    lowerBoundIncluded = bool.Parse(node.Attributes["LowerBoundIncluded"].Value);
     157    //  } else {
     158    //    lowerBoundIncluded = true;
     159    //  }
     160    //  if (node.Attributes["LowerBoundEnabled"] != null) {
     161    //    lowerBoundEnabled = bool.Parse(node.Attributes["LowerBoundEnabled"].Value);
     162    //  } else {
     163    //    lowerBoundEnabled = true;
     164    //  }
     165
     166    //  upperBound = int.Parse(node.Attributes["UpperBound"].Value);
     167    //  if (node.Attributes["UpperBoundIncluded"] != null) {
     168    //    upperBoundIncluded = bool.Parse(node.Attributes["UpperBoundIncluded"].Value);
     169    //  } else {
     170    //    upperBoundIncluded = true;
     171    //  }
     172    //  if (node.Attributes["UpperBoundEnabled"] != null) {
     173    //    upperBoundEnabled = bool.Parse(node.Attributes["UpperBoundEnabled"].Value);
     174    //  } else {
     175    //    upperBoundEnabled = true;
     176    //  }
     177    //}
     178    public override void Populate(XmlReader reader, IDictionary<Guid, IStorable> restoredObjects) {
     179      base.Populate(reader, restoredObjects);
     180      lowerBound = int.Parse(reader["LowerBound"]);
     181      if(reader["LowerBoundIncluded"] != null) {
     182        lowerBoundIncluded = bool.Parse(reader["LowerBoundIncluded"]);
    157183      } else {
    158184        lowerBoundIncluded = true;
    159185      }
    160       if (node.Attributes["LowerBoundEnabled"] != null) {
    161         lowerBoundEnabled = bool.Parse(node.Attributes["LowerBoundEnabled"].Value);
     186      if(reader["LowerBoundEnabled"] != null) {
     187        lowerBoundEnabled = bool.Parse(reader["LowerBoundEnabled"]);
    162188      } else {
    163189        lowerBoundEnabled = true;
    164190      }
    165191
    166       upperBound = int.Parse(node.Attributes["UpperBound"].Value);
    167       if (node.Attributes["UpperBoundIncluded"] != null) {
    168         upperBoundIncluded = bool.Parse(node.Attributes["UpperBoundIncluded"].Value);
     192      upperBound = int.Parse(reader["UpperBound"]);
     193      if(reader["UpperBoundIncluded"] != null) {
     194        upperBoundIncluded = bool.Parse(reader["UpperBoundIncluded"]);
    169195      } else {
    170196        upperBoundIncluded = true;
    171197      }
    172       if (node.Attributes["UpperBoundEnabled"] != null) {
    173         upperBoundEnabled = bool.Parse(node.Attributes["UpperBoundEnabled"].Value);
     198      if(reader["UpperBoundEnabled"] != null) {
     199        upperBoundEnabled = bool.Parse(reader["UpperBoundEnabled"]);
    174200      } else {
    175201        upperBoundEnabled = true;
    176202      }
    177203    }
     204
    178205    #endregion
    179206  }
  • branches/XmlTextReaderBranch/HeuristicLab.Constraints/ItemTypeConstraint.cs

    r40 r121  
    8686    }
    8787
    88     public override void Populate(XmlNode node, IDictionary<Guid, IStorable> restoredObjects) {
    89       base.Populate(node, restoredObjects);
    90       XmlAttribute itemTypeAttribute = node.Attributes["ItemType"];
    91       type = Type.GetType(itemTypeAttribute.Value);
     88    //public override void Populate(XmlNode node, IDictionary<Guid, IStorable> restoredObjects) {
     89    //  base.Populate(node, restoredObjects);
     90    //  XmlAttribute itemTypeAttribute = node.Attributes["ItemType"];
     91    //  type = Type.GetType(itemTypeAttribute.Value);
     92    //}
     93    public override void Populate(XmlReader reader, IDictionary<Guid, IStorable> restoredObjects) {
     94      base.Populate(reader, restoredObjects);
     95      type = Type.GetType(reader["ItemType"]);
    9296    }
    9397    #endregion
  • branches/XmlTextReaderBranch/HeuristicLab.Constraints/NotConstraint.cs

    r2 r121  
    7575    }
    7676
    77     public override void Populate(XmlNode node, IDictionary<Guid, IStorable> restoredObjects) {
    78       base.Populate(node, restoredObjects);
    79       subConstraint = (ConstraintBase)PersistenceManager.Restore(node.SelectSingleNode("SubConstraint"), restoredObjects);
     77    //public override void Populate(XmlNode node, IDictionary<Guid, IStorable> restoredObjects) {
     78    //  base.Populate(node, restoredObjects);
     79    //  subConstraint = (ConstraintBase)PersistenceManager.Restore(node.SelectSingleNode("SubConstraint"), restoredObjects);
     80    //}
     81    public override void Populate(XmlReader reader, IDictionary<Guid, IStorable> restoredObjects) {
     82      base.Populate(reader, restoredObjects);
     83      subConstraint = (ConstraintBase)PersistenceManager.Restore(reader, "SubConstraint", restoredObjects);
    8084    }
    8185    #endregion
  • branches/XmlTextReaderBranch/HeuristicLab.Constraints/NumberOfSubOperatorsConstraint.cs

    r2 r121  
    8888    }
    8989
    90     public override void Populate(XmlNode node, IDictionary<Guid,IStorable> restoredObjects) {
    91       base.Populate(node, restoredObjects);
    92       minOperators = (IntData)PersistenceManager.Restore(node.SelectSingleNode("min"), restoredObjects);
    93       maxOperators = (IntData)PersistenceManager.Restore(node.SelectSingleNode("max"), restoredObjects);
     90    //public override void Populate(XmlNode node, IDictionary<Guid, IStorable> restoredObjects) {
     91    //  base.Populate(node, restoredObjects);
     92    //  minOperators = (IntData)PersistenceManager.Restore(node.SelectSingleNode("min"), restoredObjects);
     93    //  maxOperators = (IntData)PersistenceManager.Restore(node.SelectSingleNode("max"), restoredObjects);
     94    //}
     95    public override void Populate(XmlReader reader, IDictionary<Guid, IStorable> restoredObjects) {
     96      base.Populate(reader, restoredObjects);
     97      minOperators = (IntData)PersistenceManager.Restore(reader, "min", restoredObjects);
     98      maxOperators = (IntData)PersistenceManager.Restore(reader, "max", restoredObjects);
    9499    }
    95100    #endregion persistence
  • branches/XmlTextReaderBranch/HeuristicLab.Constraints/OrConstraint.cs

    r40 r121  
    8282    }
    8383
    84     public override void Populate(XmlNode node, IDictionary<Guid,IStorable> restoredObjects) {
    85       base.Populate(node, restoredObjects);
    86       clauses = (ItemList<IConstraint>)PersistenceManager.Restore(node.SelectSingleNode("Clauses"), restoredObjects);
     84    //public override void Populate(XmlNode node, IDictionary<Guid,IStorable> restoredObjects) {
     85    //  base.Populate(node, restoredObjects);
     86    //  clauses = (ItemList<IConstraint>)PersistenceManager.Restore(node.SelectSingleNode("Clauses"), restoredObjects);
     87    //}
     88    public override void Populate(XmlReader reader, IDictionary<Guid, IStorable> restoredObjects) {
     89      base.Populate(reader, restoredObjects);
     90      clauses = (ItemList<IConstraint>)PersistenceManager.Restore(reader, "Clauses", restoredObjects);
    8791    }
    8892    #endregion persistence
  • branches/XmlTextReaderBranch/HeuristicLab.Constraints/SubOperatorsTypeConstraint.cs

    r2 r121  
    121121    }
    122122
    123     public override void Populate(XmlNode node, IDictionary<Guid,IStorable> restoredObjects) {
    124       base.Populate(node, restoredObjects);
    125       subOperatorIndex = (IntData)PersistenceManager.Restore(node.SelectSingleNode("SubOperatorIndex"), restoredObjects);
     123    //public override void Populate(XmlNode node, IDictionary<Guid, IStorable> restoredObjects) {
     124    //  base.Populate(node, restoredObjects);
     125    //  subOperatorIndex = (IntData)PersistenceManager.Restore(node.SelectSingleNode("SubOperatorIndex"), restoredObjects);
     126    //  subOperators = new List<IOperator>();
     127    //  foreach(XmlNode childNode in node.SelectSingleNode("AllowedSubOperators").ChildNodes) {
     128    //    subOperators.Add((IOperator)PersistenceManager.Restore(childNode, restoredObjects));
     129    //  }
     130    //}
     131    public override void Populate(XmlReader reader, IDictionary<Guid, IStorable> restoredObjects) {
     132      base.Populate(reader, restoredObjects);
     133      subOperatorIndex = (IntData)PersistenceManager.Restore(reader, "SubOperatorIndex", restoredObjects);
    126134      subOperators = new List<IOperator>();
    127       foreach(XmlNode childNode in node.SelectSingleNode("AllowedSubOperators").ChildNodes) {
    128         subOperators.Add((IOperator)PersistenceManager.Restore(childNode, restoredObjects));
    129       }
     135      reader.ReadStartElement("AllowedSubOperators");
     136      while(reader.IsStartElement())
     137        subOperators.Add((IOperator)PersistenceManager.Restore(reader, restoredObjects));
     138      reader.ReadEndElement();
    130139    }
    131140    #endregion persistence
  • branches/XmlTextReaderBranch/HeuristicLab.Constraints/VariableComparisonConstraint.cs

    r2 r121  
    117117    }
    118118
    119     public override void Populate(XmlNode node, IDictionary<Guid, IStorable> restoredObjects) {
    120       base.Populate(node, restoredObjects);
    121       leftVarName = (StringData)PersistenceManager.Restore(node.SelectSingleNode("LeftVarName"), restoredObjects);
    122       rightVarName = (StringData)PersistenceManager.Restore(node.SelectSingleNode("RightVarName"), restoredObjects);
    123       comparer = (IntData)PersistenceManager.Restore(node.SelectSingleNode("Comparer"), restoredObjects);
     119    //public override void Populate(XmlNode node, IDictionary<Guid, IStorable> restoredObjects) {
     120    //  base.Populate(node, restoredObjects);
     121    //  leftVarName = (StringData)PersistenceManager.Restore(node.SelectSingleNode("LeftVarName"), restoredObjects);
     122    //  rightVarName = (StringData)PersistenceManager.Restore(node.SelectSingleNode("RightVarName"), restoredObjects);
     123    //  comparer = (IntData)PersistenceManager.Restore(node.SelectSingleNode("Comparer"), restoredObjects);
     124    //}
     125    public override void Populate(XmlReader reader, IDictionary<Guid, IStorable> restoredObjects) {
     126      base.Populate(reader, restoredObjects);
     127      leftVarName = (StringData)PersistenceManager.Restore(reader, "LeftVarName", restoredObjects);
     128      rightVarName = (StringData)PersistenceManager.Restore(reader, "RightVarName", restoredObjects);
     129      comparer = (IntData)PersistenceManager.Restore(reader, "Comparer", restoredObjects);
    124130    }
    125131    #endregion
  • branches/XmlTextReaderBranch/HeuristicLab.Core/AtomicOperation.cs

    r2 r121  
    5757      return node;
    5858    }
    59     public override void Populate(XmlNode node, IDictionary<Guid, IStorable> restoredObjects) {
    60       base.Populate(node, restoredObjects);
    61       myOperator = (IOperator)PersistenceManager.Restore(node.SelectSingleNode("Operator"), restoredObjects);
    62       myScope = (IScope)PersistenceManager.Restore(node.SelectSingleNode("Scope"), restoredObjects);
     59    //public override void Populate(XmlNode node, IDictionary<Guid, IStorable> restoredObjects) {
     60    //  base.Populate(node, restoredObjects);
     61    //  myOperator = (IOperator)PersistenceManager.Restore(node.SelectSingleNode("Operator"), restoredObjects);
     62    //  myScope = (IScope)PersistenceManager.Restore(node.SelectSingleNode("Scope"), restoredObjects);
     63    //}
     64    public override void Populate(XmlReader reader, IDictionary<Guid, IStorable> restoredObjects) {
     65      base.Populate(reader, restoredObjects);
     66      myOperator = (IOperator)PersistenceManager.Restore(reader, "Operator", restoredObjects);
     67      myScope = (IScope)PersistenceManager.Restore(reader, "Scope", restoredObjects);
    6368    }
    6469    #endregion
  • branches/XmlTextReaderBranch/HeuristicLab.Core/CompositeOperation.cs

    r2 r121  
    7171      return node;
    7272    }
    73     public override void Populate(XmlNode node, IDictionary<Guid, IStorable> restoredObjects) {
    74       base.Populate(node, restoredObjects);
     73    //public override void Populate(XmlNode node, IDictionary<Guid, IStorable> restoredObjects) {
     74    //  base.Populate(node, restoredObjects);
    7575
    76       myExecuteInParallel = bool.Parse(node.Attributes["ExecuteInParallel"].Value);
     76    //  myExecuteInParallel = bool.Parse(node.Attributes["ExecuteInParallel"].Value);
    7777
    78       XmlNode operationsNode = node.SelectSingleNode("Operations");
    79       for (int i = 0; i < operationsNode.ChildNodes.Count; i++)
    80         AddOperation((IOperation)PersistenceManager.Restore(operationsNode.ChildNodes[i], restoredObjects));
     78    //  XmlNode operationsNode = node.SelectSingleNode("Operations");
     79    //  for (int i = 0; i < operationsNode.ChildNodes.Count; i++)
     80    //    AddOperation((IOperation)PersistenceManager.Restore(operationsNode.ChildNodes[i], restoredObjects));
     81    //}
     82    public override void Populate(XmlReader reader, IDictionary<Guid, IStorable> restoredObjects) {
     83      base.Populate(reader, restoredObjects);
     84
     85      myExecuteInParallel = bool.Parse(reader["ExecuteInParallel"]);
     86
     87      reader.ReadStartElement("Operations");
     88      while(reader.IsStartElement())
     89        AddOperation((IOperation)PersistenceManager.Restore(reader, restoredObjects));
     90      reader.ReadEndElement();
    8191    }
    8292    #endregion
  • branches/XmlTextReaderBranch/HeuristicLab.Core/ConstrainedItemBase.cs

    r2 r121  
    9797      return node;
    9898    }
    99     public override void Populate(XmlNode node, IDictionary<Guid,IStorable> restoredObjects) {
    100       base.Populate(node, restoredObjects);
    101       XmlNode constraintsNode = node.SelectSingleNode("Constraints");
    102       if (constraintsNode != null) {
     99    //public override void Populate(XmlNode node, IDictionary<Guid, IStorable> restoredObjects) {
     100    //  base.Populate(node, restoredObjects);
     101    //  XmlNode constraintsNode = node.SelectSingleNode("Constraints");
     102    //  if(constraintsNode != null) {
     103    //    myConstraints.Clear();
     104    //    foreach(XmlNode constraintNode in constraintsNode.ChildNodes)
     105    //      AddConstraint((IConstraint)PersistenceManager.Restore(constraintNode, restoredObjects));
     106    //  }
     107    //}
     108    public override void Populate(XmlReader reader, IDictionary<Guid, IStorable> restoredObjects) {
     109      base.Populate(reader, restoredObjects);
     110      if(reader.IsStartElement()) {
     111        reader.ReadToDescendant("Constraints");
    103112        myConstraints.Clear();
    104         foreach (XmlNode constraintNode in constraintsNode.ChildNodes)
    105           AddConstraint((IConstraint)PersistenceManager.Restore(constraintNode, restoredObjects));
     113        while(reader.IsStartElement())
     114          AddConstraint((IConstraint)PersistenceManager.Restore(reader, restoredObjects));
     115        reader.ReadEndElement();
    106116      }
    107117    }
  • branches/XmlTextReaderBranch/HeuristicLab.Core/EngineBase.cs

    r47 r121  
    190190      return node;
    191191    }
    192     public override void Populate(XmlNode node, IDictionary<Guid,IStorable> restoredObjects) {
    193       base.Populate(node, restoredObjects);
    194       myOperatorGraph = (IOperatorGraph)PersistenceManager.Restore(node.SelectSingleNode("OperatorGraph"), restoredObjects);
    195       myGlobalScope = (IScope)PersistenceManager.Restore(node.SelectSingleNode("GlobalScope"), restoredObjects);
    196 
    197       XmlNode stackNode = node.SelectSingleNode("ExecutionStack");
    198       for (int i = stackNode.ChildNodes.Count - 1; i >= 0; i--)
    199         myExecutionStack.Push((IOperation)PersistenceManager.Restore(stackNode.ChildNodes[i], restoredObjects));
    200 
    201       XmlNode timeNode = node.SelectSingleNode("ExecutionTime");
    202       myExecutionTime = TimeSpan.Parse(timeNode.InnerText);
     192    public override void Populate(XmlReader reader, IDictionary<Guid,IStorable> restoredObjects) {
     193      base.Populate(reader, restoredObjects);
     194      myOperatorGraph = (IOperatorGraph)PersistenceManager.Restore(reader, "OperatorGraph", restoredObjects);
     195      myGlobalScope = (IScope)PersistenceManager.Restore(reader, "GlobalScope", restoredObjects);
     196
     197      reader.ReadStartElement("ExecutionStack");
     198      List<IOperation> operationList = new List<IOperation>();
     199      while(reader.IsStartElement()) {
     200        operationList.Insert(0, (IOperation)PersistenceManager.Restore(reader, restoredObjects));
     201      }
     202      foreach(IOperation op in operationList)
     203        myExecutionStack.Push(op);
     204      reader.ReadEndElement();
     205
     206      reader.ReadStartElement("ExecutionTime");
     207      myExecutionTime = TimeSpan.Parse(reader.ReadString());
     208      reader.ReadEndElement();
    203209    }
    204210    #endregion
  • branches/XmlTextReaderBranch/HeuristicLab.Core/Interfaces/IStorable.cs

    r2 r121  
    3333
    3434    XmlNode GetXmlNode(string name, XmlDocument document, IDictionary<Guid, IStorable> persistedObjects);
    35     void Populate(XmlNode node, IDictionary<Guid, IStorable> restoredObjects);
     35    void Populate(XmlReader reader, IDictionary<Guid, IStorable> restoredObjects);
    3636  }
    3737}
  • branches/XmlTextReaderBranch/HeuristicLab.Core/OperatorBase.cs

    r76 r121  
    461461      return node;
    462462    }
    463     public override void Populate(XmlNode node, IDictionary<Guid,IStorable> restoredObjects) {
    464       base.Populate(node, restoredObjects);
    465       myName = node.Attributes["Name"].Value;
    466       if (node.Attributes["Breakpoint"] != null)
    467         myBreakpoint = bool.Parse(node.Attributes["Breakpoint"].Value);
    468       XmlNode subOperatorsNode = node.SelectSingleNode("SubOperators");
    469       for (int i = 0; i < subOperatorsNode.ChildNodes.Count; i++)
    470         AddSubOperator((IOperator)PersistenceManager.Restore(subOperatorsNode.ChildNodes[i], restoredObjects));
    471       XmlNode infosNode = node.SelectSingleNode("VariableInfos");
     463    //public override void Populate(XmlNode node, IDictionary<Guid, IStorable> restoredObjects) {
     464    //  base.Populate(node, restoredObjects);
     465    //  myName = node.Attributes["Name"].Value;
     466    //  if(node.Attributes["Breakpoint"] != null)
     467    //    myBreakpoint = bool.Parse(node.Attributes["Breakpoint"].Value);
     468    //  XmlNode subOperatorsNode = node.SelectSingleNode("SubOperators");
     469    //  for(int i = 0; i < subOperatorsNode.ChildNodes.Count; i++)
     470    //    AddSubOperator((IOperator)PersistenceManager.Restore(subOperatorsNode.ChildNodes[i], restoredObjects));
     471    //  XmlNode infosNode = node.SelectSingleNode("VariableInfos");
     472    //  myVariableInfos.Clear();
     473    //  foreach(XmlNode infoNode in infosNode.ChildNodes)
     474    //    AddVariableInfo((IVariableInfo)PersistenceManager.Restore(infoNode, restoredObjects));
     475    //  XmlNode variablesNode = node.SelectSingleNode("Variables");
     476    //  myVariables.Clear();
     477    //  foreach(XmlNode variableNode in variablesNode.ChildNodes)
     478    //    AddVariable((IVariable)PersistenceManager.Restore(variableNode, restoredObjects));
     479    //}
     480    public override void Populate(XmlReader reader, IDictionary<Guid, IStorable> restoredObjects) {
     481      base.Populate(reader, restoredObjects);
     482      myName = reader["Name"];
     483      if(reader["Breakpoint"] != null)
     484        myBreakpoint = bool.Parse(reader["Breakpoint"]);
     485      reader.ReadStartElement("SubOperators");
     486      while(reader.IsStartElement())
     487        AddSubOperator((IOperator)PersistenceManager.Restore(reader, restoredObjects));
     488      reader.ReadEndElement();
     489      reader.ReadStartElement("VariableInfos");
    472490      myVariableInfos.Clear();
    473       foreach (XmlNode infoNode in infosNode.ChildNodes)
    474         AddVariableInfo((IVariableInfo)PersistenceManager.Restore(infoNode, restoredObjects));
    475       XmlNode variablesNode = node.SelectSingleNode("Variables");
     491      while(reader.IsStartElement())
     492        AddVariableInfo((IVariableInfo)PersistenceManager.Restore(reader, restoredObjects));
     493      reader.ReadEndElement();
     494      reader.ReadStartElement("Variables");
    476495      myVariables.Clear();
    477       foreach (XmlNode variableNode in variablesNode.ChildNodes)
    478         AddVariable((IVariable)PersistenceManager.Restore(variableNode, restoredObjects));
     496      while(reader.IsStartElement())
     497        AddVariable((IVariable)PersistenceManager.Restore(reader, restoredObjects));
     498      reader.ReadEndElement();
    479499    }
    480500    #endregion
  • branches/XmlTextReaderBranch/HeuristicLab.Core/OperatorGraph.cs

    r47 r121  
    3535      get { return myInitialOperator; }
    3636      set {
    37         if (myInitialOperator != value) {
     37        if(myInitialOperator != value) {
    3838          myInitialOperator = value;
    3939          OnInitialOperatorChanged();
     
    5353      OperatorGraph clone = new OperatorGraph();
    5454      clonedObjects.Add(Guid, clone);
    55       foreach (IOperator op in Operators)
     55      foreach(IOperator op in Operators)
    5656        clone.AddOperator((IOperator)Auxiliary.Clone(op, clonedObjects));
    57       if (InitialOperator != null)
     57      if(InitialOperator != null)
    5858        clone.myInitialOperator = (IOperator)Auxiliary.Clone(InitialOperator, clonedObjects);
    5959      return clone;
     
    6161
    6262    public void AddOperator(IOperator op) {
    63       if (!myOperators.ContainsKey(op.Guid)) {
     63      if(!myOperators.ContainsKey(op.Guid)) {
    6464        myOperators.Add(op.Guid, op);
    6565        OnOperatorAdded(op);
    6666
    67         foreach (IOperator subOperator in op.SubOperators)
     67        foreach(IOperator subOperator in op.SubOperators)
    6868          AddOperator(subOperator);
    6969      }
     
    7171    public void RemoveOperator(Guid guid) {
    7272      IOperator op = GetOperator(guid);
    73       if (op != null) {
    74         foreach (IOperator o in Operators) {
     73      if(op != null) {
     74        foreach(IOperator o in Operators) {
    7575          int i = 0;
    76           while (i < o.SubOperators.Count) {
    77             if (o.SubOperators[i] == op)
     76          while(i < o.SubOperators.Count) {
     77            if(o.SubOperators[i] == op)
    7878              o.RemoveSubOperator(i);
    7979            else
     
    8181          }
    8282        }
    83         if (InitialOperator == op)
     83        if(InitialOperator == op)
    8484          InitialOperator = null;
    8585        myOperators.Remove(op.Guid);
     
    8989    public IOperator GetOperator(Guid guid) {
    9090      IOperator op;
    91       if (myOperators.TryGetValue(guid, out op))
     91      if(myOperators.TryGetValue(guid, out op))
    9292        return op;
    9393      else
     
    9797      Guid[] guids = new Guid[Operators.Count];
    9898      int i = 0;
    99       foreach (IOperator op in Operators) {
     99      foreach(IOperator op in Operators) {
    100100        guids[i] = op.Guid;
    101101        i++;
    102102      }
    103       for (int j = 0; j < guids.Length; j++)
     103      for(int j = 0; j < guids.Length; j++)
    104104        RemoveOperator(guids[j]);
    105105    }
     
    107107    public event EventHandler<OperatorEventArgs> OperatorAdded;
    108108    protected virtual void OnOperatorAdded(IOperator op) {
    109       if (OperatorAdded != null)
     109      if(OperatorAdded != null)
    110110        OperatorAdded(this, new OperatorEventArgs(op));
    111111    }
    112112    public event EventHandler<OperatorEventArgs> OperatorRemoved;
    113113    protected virtual void OnOperatorRemoved(IOperator op) {
    114       if (OperatorRemoved != null)
     114      if(OperatorRemoved != null)
    115115        OperatorRemoved(this, new OperatorEventArgs(op));
    116116    }
    117117    public event EventHandler InitialOperatorChanged;
    118118    protected virtual void OnInitialOperatorChanged() {
    119       if (InitialOperatorChanged != null)
     119      if(InitialOperatorChanged != null)
    120120        InitialOperatorChanged(this, new EventArgs());
    121121    }
    122122
    123123    #region Persistence Methods
    124     public override XmlNode GetXmlNode(string name, XmlDocument document, IDictionary<Guid,IStorable> persistedObjects) {
     124    public override XmlNode GetXmlNode(string name, XmlDocument document, IDictionary<Guid, IStorable> persistedObjects) {
    125125      XmlNode node = base.GetXmlNode(name, document, persistedObjects);
    126126      XmlNode ops = document.CreateNode(XmlNodeType.Element, "Operators", null);
    127       foreach (IOperator op in myOperators.Values)
     127      foreach(IOperator op in myOperators.Values)
    128128        ops.AppendChild(PersistenceManager.Persist(op, document, persistedObjects));
    129129      node.AppendChild(ops);
    130       if (InitialOperator != null)
     130      if(InitialOperator != null)
    131131        node.AppendChild(PersistenceManager.Persist("InitialOperator", InitialOperator, document, persistedObjects));
    132132      return node;
    133133    }
    134     public override void Populate(XmlNode node, IDictionary<Guid,IStorable> restoredObjects) {
    135       base.Populate(node, restoredObjects);
     134    //public override void Populate(XmlNode node, IDictionary<Guid, IStorable> restoredObjects) {
     135    //  base.Populate(node, restoredObjects);
    136136
    137       XmlNode ops = node.SelectSingleNode("Operators");
    138       for (int i = 0; i < ops.ChildNodes.Count; i++) {
    139         XmlNode opNode = ops.ChildNodes[i];
    140         IOperator op = (IOperator)PersistenceManager.Restore(opNode, restoredObjects);
     137    //  XmlNode ops = node.SelectSingleNode("Operators");
     138    //  for(int i = 0; i < ops.ChildNodes.Count; i++) {
     139    //    XmlNode opNode = ops.ChildNodes[i];
     140    //    IOperator op = (IOperator)PersistenceManager.Restore(opNode, restoredObjects);
     141    //    myOperators.Add(op.Guid, op);
     142    //  }
     143
     144    //  XmlNode initial = node.SelectSingleNode("InitialOperator");
     145    //  if(initial != null)
     146    //    myInitialOperator = (IOperator)PersistenceManager.Restore(initial, restoredObjects);
     147    //}
     148    public override void Populate(XmlReader reader, IDictionary<Guid, IStorable> restoredObjects) {
     149      base.Populate(reader, restoredObjects);
     150
     151      reader.ReadToDescendant("Operators");
     152      while(reader.IsStartElement()) {
     153        IOperator op = (IOperator)PersistenceManager.Restore(reader, restoredObjects);
    141154        myOperators.Add(op.Guid, op);
    142155      }
    143 
    144       XmlNode initial = node.SelectSingleNode("InitialOperator");
    145       if (initial != null)
    146         myInitialOperator = (IOperator)PersistenceManager.Restore(initial, restoredObjects);
     156      reader.ReadEndElement();
     157      if(reader.IsStartElement()) {
     158        myInitialOperator = (IOperator)PersistenceManager.Restore(reader, "InitialOperator", restoredObjects);
     159      }
    147160    }
    148161    #endregion
  • branches/XmlTextReaderBranch/HeuristicLab.Core/OperatorGroup.cs

    r2 r121  
    9898      return node;
    9999    }
    100     public override void Populate(XmlNode node, IDictionary<Guid,IStorable> restoredObjects) {
    101       base.Populate(node, restoredObjects);
    102       myName = node.Attributes["Name"].Value;
    103       XmlNode subGroupsNode = node.SelectSingleNode("SubGroups");
    104       foreach (XmlNode subGroupNode in subGroupsNode.ChildNodes)
    105         AddSubGroup((IOperatorGroup)PersistenceManager.Restore(subGroupNode, restoredObjects));
    106       XmlNode operatorsNode = node.SelectSingleNode("Operators");
    107       foreach (XmlNode operatorNode in operatorsNode.ChildNodes)
    108         AddOperator((IOperator)PersistenceManager.Restore(operatorNode, restoredObjects));
     100    //public override void Populate(XmlNode node, IDictionary<Guid, IStorable> restoredObjects) {
     101    //  base.Populate(node, restoredObjects);
     102    //  myName = node.Attributes["Name"].Value;
     103    //  XmlNode subGroupsNode = node.SelectSingleNode("SubGroups");
     104    //  foreach(XmlNode subGroupNode in subGroupsNode.ChildNodes)
     105    //    AddSubGroup((IOperatorGroup)PersistenceManager.Restore(subGroupNode, restoredObjects));
     106    //  XmlNode operatorsNode = node.SelectSingleNode("Operators");
     107    //  foreach(XmlNode operatorNode in operatorsNode.ChildNodes)
     108    //    AddOperator((IOperator)PersistenceManager.Restore(operatorNode, restoredObjects));
     109    //}
     110    public override void Populate(XmlReader reader, IDictionary<Guid, IStorable> restoredObjects) {
     111      base.Populate(reader, restoredObjects);
     112      myName = reader["Name"];
     113      reader.ReadStartElement("SubGroups");
     114      while(reader.IsStartElement())
     115        AddSubGroup((IOperatorGroup)PersistenceManager.Restore(reader, restoredObjects));
     116      reader.ReadEndElement();
     117      reader.ReadStartElement("Operators");
     118      while(reader.IsStartElement())
     119        AddOperator((IOperator)PersistenceManager.Restore(reader, restoredObjects));
     120      reader.ReadEndElement();
    109121    }
    110122    #endregion
  • branches/XmlTextReaderBranch/HeuristicLab.Core/OperatorLibrary.cs

    r2 r121  
    5656      return node;
    5757    }
    58     public override void Populate(XmlNode node, IDictionary<Guid,IStorable> restoredObjects) {
    59       base.Populate(node, restoredObjects);
    60       myGroup = (IOperatorGroup)PersistenceManager.Restore(node.SelectSingleNode("OperatorGroup"), restoredObjects);
     58    public override void Populate(XmlReader reader, IDictionary<Guid,IStorable> restoredObjects) {
     59      base.Populate(reader, restoredObjects);
     60      myGroup = (IOperatorGroup)PersistenceManager.Restore(reader, "OperatorGroup", restoredObjects);
    6161    }
    6262    #endregion
  • branches/XmlTextReaderBranch/HeuristicLab.Core/PersistenceManager.cs

    r40 r121  
    4949      }
    5050    }
    51     public static IStorable Restore(XmlNode node, IDictionary<Guid,IStorable> restoredObjects) {
    52       Guid guid = new Guid(node.Attributes["GUID"].Value);
    53       if (restoredObjects.ContainsKey(guid)) {
     51
     52    public static IStorable Restore(XmlReader reader, string elementName, IDictionary<Guid, IStorable> restoredObjects) {
     53      reader.ReadToDescendant(elementName);
     54      return RestoreElement(reader, restoredObjects);
     55    }
     56
     57    public static IStorable Restore(XmlReader reader, IDictionary<Guid, IStorable> restoredObjects) {
     58      reader.Read();
     59      return RestoreElement(reader, restoredObjects);
     60    }
     61    private static IStorable RestoreElement(XmlReader reader, IDictionary<Guid, IStorable> restoredObjects) {
     62      Guid guid = new Guid(reader["GUID"]);
     63      if(restoredObjects.ContainsKey(guid)) {
     64        reader.ReadEndElement();
    5465        return restoredObjects[guid];
    5566      } else {
    56         Type type = Type.GetType(node.Attributes["Type"].Value, true);
     67        Type type = Type.GetType(reader["Type"], true);
    5768        IStorable instance = (IStorable)Activator.CreateInstance(type);
    5869        restoredObjects.Add(guid, instance);
    59         instance.Populate(node, restoredObjects);
     70        instance.Populate(reader, restoredObjects);
     71        reader.ReadEndElement();
    6072        return instance;
    6173      }
     
    7991    public static IStorable Load(Stream stream) {
    8092      XmlDocument doc = new XmlDocument();
    81       doc.Load(stream);
    82       return PersistenceManager.Restore(doc.ChildNodes[1], new Dictionary<Guid, IStorable>());
     93      XmlTextReader reader = new XmlTextReader(stream);
     94      reader.WhitespaceHandling = WhitespaceHandling.None;
     95      reader.MoveToContent(); // read "<?xml version="1.0"?/>
     96      return PersistenceManager.RestoreElement(reader, new Dictionary<Guid, IStorable>());
    8397    }
    8498
  • branches/XmlTextReaderBranch/HeuristicLab.Core/Scope.cs

    r63 r121  
    290290      return node;
    291291    }
    292     public override void Populate(XmlNode node, IDictionary<Guid,IStorable> restoredObjects) {
    293       base.Populate(node, restoredObjects);
    294       myName = node.Attributes["Name"].Value;
    295 
    296       XmlNode variables = node.SelectSingleNode("Variables");
    297       foreach (XmlNode variableNode in variables.ChildNodes) {
    298         IVariable variable = (IVariable)PersistenceManager.Restore(variableNode, restoredObjects);
     292    //public override void Populate(XmlNode node, IDictionary<Guid, IStorable> restoredObjects) {
     293    //  base.Populate(node, restoredObjects);
     294    //  myName = node.Attributes["Name"].Value;
     295
     296    //  XmlNode variables = node.SelectSingleNode("Variables");
     297    //  foreach(XmlNode variableNode in variables.ChildNodes) {
     298    //    IVariable variable = (IVariable)PersistenceManager.Restore(variableNode, restoredObjects);
     299    //    AddVariable(variable);
     300    //  }
     301
     302    //  XmlNode aliases = node.SelectSingleNode("Aliases");
     303    //  if(aliases != null) {
     304    //    foreach(XmlNode aliasNode in aliases.ChildNodes)
     305    //      AddAlias(aliasNode.Attributes["Alias"].Value, aliasNode.Attributes["Name"].Value);
     306    //  }
     307
     308    //  XmlNode subScopes = node.SelectSingleNode("SubScopes");
     309    //  for(int i = 0; i < subScopes.ChildNodes.Count; i++) {
     310    //    IScope scope = (IScope)PersistenceManager.Restore(subScopes.ChildNodes[i], restoredObjects);
     311    //    AddSubScope(scope);
     312    //  }
     313    //}
     314    public override void Populate(XmlReader reader, IDictionary<Guid, IStorable> restoredObjects) {
     315      base.Populate(reader, restoredObjects);
     316      myName = reader["Name"];
     317
     318      reader.ReadStartElement("Variables");
     319      while(reader.IsStartElement()) {
     320        IVariable variable = (IVariable)PersistenceManager.Restore(reader, restoredObjects);
    299321        AddVariable(variable);
    300322      }
    301 
    302       XmlNode aliases = node.SelectSingleNode("Aliases");
    303       if (aliases != null) {
    304         foreach (XmlNode aliasNode in aliases.ChildNodes)
    305           AddAlias(aliasNode.Attributes["Alias"].Value, aliasNode.Attributes["Name"].Value);
    306       }
    307 
    308       XmlNode subScopes = node.SelectSingleNode("SubScopes");
    309       for (int i = 0; i < subScopes.ChildNodes.Count; i++) {
    310         IScope scope = (IScope)PersistenceManager.Restore(subScopes.ChildNodes[i], restoredObjects);
     323      reader.ReadEndElement();
     324
     325      if(reader.IsStartElement() && reader.Name=="Aliases") {
     326        reader.ReadStartElement("Aliases");
     327        while(reader.IsStartElement())
     328          AddAlias(reader["Alias"], reader["Name"]);
     329        reader.ReadEndElement();
     330      }
     331      reader.ReadStartElement("SubScopes");
     332      while(reader.IsStartElement()) {
     333        IScope scope = (IScope)PersistenceManager.Restore(reader, restoredObjects);
    311334        AddSubScope(scope);
    312335      }
     336      reader.ReadEndElement();
    313337    }
    314338    #endregion
  • branches/XmlTextReaderBranch/HeuristicLab.Core/StorableBase.cs

    r40 r121  
    5555      return node;
    5656    }
    57     public virtual void Populate(XmlNode node, IDictionary<Guid,IStorable> restoredObjects) {
    58       myGuid = new Guid(node.Attributes["GUID"].Value);
     57    public virtual void Populate(XmlReader reader, IDictionary<Guid,IStorable> restoredObjects) {
     58      myGuid = new Guid(reader["GUID"]);
    5959    }
    6060  }
  • branches/XmlTextReaderBranch/HeuristicLab.Core/Variable.cs

    r2 r121  
    109109      return node;
    110110    }
    111     public override void Populate(XmlNode node, IDictionary<Guid,IStorable> restoredObjects) {
    112       myName = node.Attributes["Name"].Value;
    113       XmlNode valueNode = node.SelectSingleNode("Value");
    114       if (valueNode != null)
    115         myValue = (IItem)PersistenceManager.Restore(valueNode, restoredObjects);
     111    //public override void Populate(XmlNode node, IDictionary<Guid, IStorable> restoredObjects) {
     112    //  myName = node.Attributes["Name"].Value;
     113    //  XmlNode valueNode = node.SelectSingleNode("Value");
     114    //  if(valueNode != null)
     115    //    myValue = (IItem)PersistenceManager.Restore(valueNode, restoredObjects);
     116    //}
     117    public override void Populate(XmlReader reader, IDictionary<Guid, IStorable> restoredObjects) {
     118      myName = reader["Name"];
     119      if(reader.IsStartElement())
     120        myValue = (IItem)PersistenceManager.Restore(reader, "Value", restoredObjects);
    116121    }
    117122    #endregion
  • branches/XmlTextReaderBranch/HeuristicLab.Core/VariableInfo.cs

    r40 r121  
    137137      return node;
    138138    }
    139     public override void Populate(XmlNode node, IDictionary<Guid,IStorable> restoredObjects) {
    140       myActualName = node.Attributes["ActualName"].Value;
    141       myFormalName = node.Attributes["FormalName"].Value;
    142       myDescription = node.Attributes["Description"].Value;
    143       myDataType = Type.GetType(node.Attributes["DataType"].Value, true);
    144       myKind = (VariableKind)Enum.Parse(typeof(VariableKind), node.Attributes["Kind"].Value);
    145       myLocal = bool.Parse(node.Attributes["Local"].Value);
     139    //public override void Populate(XmlNode node, IDictionary<Guid, IStorable> restoredObjects) {
     140    //  myActualName = node.Attributes["ActualName"].Value;
     141    //  myFormalName = node.Attributes["FormalName"].Value;
     142    //  myDescription = node.Attributes["Description"].Value;
     143    //  myDataType = Type.GetType(node.Attributes["DataType"].Value, true);
     144    //  myKind = (VariableKind)Enum.Parse(typeof(VariableKind), node.Attributes["Kind"].Value);
     145    //  myLocal = bool.Parse(node.Attributes["Local"].Value);
     146    //}
     147    public override void Populate(XmlReader reader, IDictionary<Guid, IStorable> restoredObjects) {
     148      myActualName = reader["ActualName"];
     149      myFormalName = reader["FormalName"];
     150      myDescription = reader["Description"];
     151      myDataType = Type.GetType(reader["DataType"], true);
     152      myKind = (VariableKind)Enum.Parse(typeof(VariableKind), reader["Kind"]);
     153      myLocal = bool.Parse(reader["Local"]);
    146154    }
    147155    #endregion
  • branches/XmlTextReaderBranch/HeuristicLab.Data/BoolArrayData.cs

    r2 r121  
    4949      return node;
    5050    }
    51     public override void Populate(XmlNode node, IDictionary<Guid,IStorable> restoredObjects) {
    52       base.Populate(node, restoredObjects);
    53       string[] tokens = node.InnerText.Split(';');
     51    //public override void Populate(XmlNode node, IDictionary<Guid, IStorable> restoredObjects) {
     52    //  base.Populate(node, restoredObjects);
     53    //  string[] tokens = node.InnerText.Split(';');
     54    //  bool[] data = new bool[tokens.Length];
     55    //  for(int i = 0; i < data.Length; i++)
     56    //    data[i] = bool.Parse(tokens[i]);
     57    //  Data = data;
     58    //}
     59    public override void Populate(XmlReader reader, IDictionary<Guid, IStorable> restoredObjects) {
     60      base.Populate(reader, restoredObjects);
     61      string[] tokens = reader.ReadString().Split(';');
    5462      bool[] data = new bool[tokens.Length];
    55       for (int i = 0; i < data.Length; i++)
     63      for(int i = 0; i < data.Length; i++)
    5664        data[i] = bool.Parse(tokens[i]);
    5765      Data = data;
  • branches/XmlTextReaderBranch/HeuristicLab.Data/BoolData.cs

    r2 r121  
    5656      return node;
    5757    }
    58     public override void Populate(XmlNode node, IDictionary<Guid,IStorable> restoredObjects) {
    59       base.Populate(node, restoredObjects);
    60       Data = bool.Parse(node.InnerText);
     58    //public override void Populate(XmlNode node, IDictionary<Guid, IStorable> restoredObjects) {
     59    //  base.Populate(node, restoredObjects);
     60    //  Data = bool.Parse(node.InnerText);
     61    //}
     62    public override void Populate(XmlReader reader, IDictionary<Guid, IStorable> restoredObjects) {
     63      base.Populate(reader, restoredObjects);
     64      Data = bool.Parse(reader.ReadString());
    6165    }
    6266
  • branches/XmlTextReaderBranch/HeuristicLab.Data/BoolMatrixData.cs

    r2 r121  
    5656      return node;
    5757    }
    58     public override void Populate(XmlNode node, IDictionary<Guid,IStorable> restoredObjects) {
    59       base.Populate(node, restoredObjects);
    60       int dim1 = int.Parse(node.Attributes["Dimension1"].Value, CultureInfo.InvariantCulture.NumberFormat);
    61       int dim2 = int.Parse(node.Attributes["Dimension2"].Value, CultureInfo.InvariantCulture.NumberFormat);
    62       string[] tokens = node.InnerText.Split(';');
     58    //public override void Populate(XmlNode node, IDictionary<Guid, IStorable> restoredObjects) {
     59    //  base.Populate(node, restoredObjects);
     60    //  int dim1 = int.Parse(node.Attributes["Dimension1"].Value, CultureInfo.InvariantCulture.NumberFormat);
     61    //  int dim2 = int.Parse(node.Attributes["Dimension2"].Value, CultureInfo.InvariantCulture.NumberFormat);
     62    //  string[] tokens = node.InnerText.Split(';');
     63    //  bool[,] data = new bool[dim1, dim2];
     64    //  for(int i = 0; i < dim1; i++) {
     65    //    for(int j = 0; j < dim2; j++) {
     66    //      data[i, j] = bool.Parse(tokens[i * dim2 + j]);
     67    //    }
     68    //  }
     69    //  Data = data;
     70    //}
     71    public override void Populate(XmlReader reader, IDictionary<Guid, IStorable> restoredObjects) {
     72      base.Populate(reader, restoredObjects);
     73      int dim1 = int.Parse(reader["Dimension1"], CultureInfo.InvariantCulture.NumberFormat);
     74      int dim2 = int.Parse(reader["Dimension2"], CultureInfo.InvariantCulture.NumberFormat);
     75      string[] tokens = reader.ReadString().Split(';');
    6376      bool[,] data = new bool[dim1, dim2];
    64       for (int i = 0; i < dim1; i++) {
    65         for (int j = 0; j < dim2; j++) {
     77      for(int i = 0; i < dim1; i++) {
     78        for(int j = 0; j < dim2; j++) {
    6679          data[i, j] = bool.Parse(tokens[i * dim2 + j]);
    6780        }
  • branches/XmlTextReaderBranch/HeuristicLab.Data/ConstrainedDoubleData.cs

    r2 r121  
    6161      return node;
    6262    }
    63     public override void Populate(XmlNode node, IDictionary<Guid,IStorable> restoredObjects) {
    64       base.Populate(node, restoredObjects);
    65       base.Data = (DoubleData)PersistenceManager.Restore(node.SelectSingleNode("Value"), restoredObjects);
     63    //public override void Populate(XmlNode node, IDictionary<Guid, IStorable> restoredObjects) {
     64    //  base.Populate(node, restoredObjects);
     65    //  base.Data = (DoubleData)PersistenceManager.Restore(node.SelectSingleNode("Value"), restoredObjects);
     66    //}
     67    public override void Populate(XmlReader reader, IDictionary<Guid, IStorable> restoredObjects) {
     68      base.Populate(reader, restoredObjects);
     69      base.Data = (DoubleData)PersistenceManager.Restore(reader, "Value", restoredObjects);
    6670    }
    6771
  • branches/XmlTextReaderBranch/HeuristicLab.Data/ConstrainedIntData.cs

    r2 r121  
    6161      return node;
    6262    }
    63     public override void Populate(XmlNode node, IDictionary<Guid,IStorable> restoredObjects) {
    64       base.Populate(node, restoredObjects);
    65       base.Data = (IntData)PersistenceManager.Restore(node.SelectSingleNode("Value"), restoredObjects);
     63    //public override void Populate(XmlNode node, IDictionary<Guid, IStorable> restoredObjects) {
     64    //  base.Populate(node, restoredObjects);
     65    //  base.Data = (IntData)PersistenceManager.Restore(node.SelectSingleNode("Value"), restoredObjects);
     66    //}
     67    public override void Populate(XmlReader reader, IDictionary<Guid, IStorable> restoredObjects) {
     68      base.Populate(reader, restoredObjects);
     69      base.Data = (IntData)PersistenceManager.Restore(reader, "Value", restoredObjects);
    6670    }
    6771
  • branches/XmlTextReaderBranch/HeuristicLab.Data/ConstrainedItemList.cs

    r2 r121  
    6767    }
    6868
    69     public override void Populate(XmlNode node, IDictionary<Guid,IStorable> restoredObjects) {
    70       base.Populate(node, restoredObjects);
    71       XmlNode listNode = node.SelectSingleNode("ListItems");
     69    //public override void Populate(XmlNode node, IDictionary<Guid, IStorable> restoredObjects) {
     70    //  base.Populate(node, restoredObjects);
     71    //  XmlNode listNode = node.SelectSingleNode("ListItems");
     72    //  list = new List<IItem>();
     73    //  for(int i = 0; i < listNode.ChildNodes.Count; i++)
     74    //    list.Add((IItem)PersistenceManager.Restore(listNode.ChildNodes[i], restoredObjects));
     75    //  suspendConstraintCheck = bool.Parse(listNode.Attributes["SuspendConstraintCheck"].Value);
     76    //}
     77    public override void Populate(XmlReader reader, IDictionary<Guid, IStorable> restoredObjects) {
     78      base.Populate(reader, restoredObjects);
     79      reader.ReadStartElement("ListItems");
     80      suspendConstraintCheck = bool.Parse(reader["SuspendConstraintCheck"]);
    7281      list = new List<IItem>();
    73       for (int i = 0; i < listNode.ChildNodes.Count; i++)
    74         list.Add((IItem)PersistenceManager.Restore(listNode.ChildNodes[i], restoredObjects));
    75       suspendConstraintCheck = bool.Parse(listNode.Attributes["SuspendConstraintCheck"].Value);
     82      while(reader.IsStartElement())
     83        list.Add((IItem)PersistenceManager.Restore(reader, restoredObjects));
     84      reader.ReadEndElement();
    7685    }
    7786    #endregion
  • branches/XmlTextReaderBranch/HeuristicLab.Data/DoubleArrayData.cs

    r2 r121  
    5050      return node;
    5151    }
    52     public override void Populate(XmlNode node, IDictionary<Guid,IStorable> restoredObjects) {
    53       base.Populate(node, restoredObjects);
    54       string[] tokens = node.InnerText.Split(';');
     52    //public override void Populate(XmlNode node, IDictionary<Guid, IStorable> restoredObjects) {
     53    //  base.Populate(node, restoredObjects);
     54    //  string[] tokens = node.InnerText.Split(';');
     55    //  double[] data = new double[tokens.Length];
     56    //  for(int i = 0; i < data.Length; i++)
     57    //    if(double.TryParse(tokens[i], NumberStyles.Float, CultureInfo.InvariantCulture.NumberFormat, out data[i]) == false) {
     58    //      throw new FormatException("Can't parse " + tokens[i] + " as double value.");
     59    //    }
     60    //  Data = data;
     61    //}
     62    public override void Populate(XmlReader reader, IDictionary<Guid, IStorable> restoredObjects) {
     63      base.Populate(reader, restoredObjects);
     64      string[] tokens = reader.ReadString().Split(';');
    5565      double[] data = new double[tokens.Length];
    5666      for(int i = 0; i < data.Length; i++)
  • branches/XmlTextReaderBranch/HeuristicLab.Data/DoubleData.cs

    r2 r121  
    5757      return node;
    5858    }
    59     public override void Populate(XmlNode node, IDictionary<Guid,IStorable> restoredObjects) {
    60       base.Populate(node, restoredObjects);
     59    //public override void Populate(XmlNode node, IDictionary<Guid, IStorable> restoredObjects) {
     60    //  base.Populate(node, restoredObjects);
     61    //  double data;
     62    //  if(double.TryParse(node.InnerText, NumberStyles.Float, CultureInfo.InvariantCulture.NumberFormat, out data) == true) {
     63    //    Data = data;
     64    //  } else {
     65    //    throw new FormatException("Can't parse " + node.InnerText + " as double value.");
     66    //  }
     67    //}
     68    public override void Populate(XmlReader reader, IDictionary<Guid, IStorable> restoredObjects) {
     69      base.Populate(reader, restoredObjects);
    6170      double data;
    62       if(double.TryParse(node.InnerText, NumberStyles.Float, CultureInfo.InvariantCulture.NumberFormat, out data) == true) {
     71      if(double.TryParse(reader.ReadString(), NumberStyles.Float, CultureInfo.InvariantCulture.NumberFormat, out data) == true) {
    6372        Data = data;
    6473      } else {
    65         throw new FormatException("Can't parse " + node.InnerText + " as double value.");       
     74        throw new FormatException("Can't parse " + reader.ReadString() + " as double value.");
    6675      }
    6776    }
  • branches/XmlTextReaderBranch/HeuristicLab.Data/DoubleMatrixData.cs

    r2 r121  
    5656      return node;
    5757    }
    58     public override void Populate(XmlNode node, IDictionary<Guid,IStorable> restoredObjects) {
    59       base.Populate(node, restoredObjects);
    60       int dim1 = int.Parse(node.Attributes["Dimension1"].Value, CultureInfo.InvariantCulture.NumberFormat);
    61       int dim2 = int.Parse(node.Attributes["Dimension2"].Value, CultureInfo.InvariantCulture.NumberFormat);
    62       string[] tokens = node.InnerText.Split(';');
     58    //public override void Populate(XmlNode node, IDictionary<Guid, IStorable> restoredObjects) {
     59    //  base.Populate(node, restoredObjects);
     60    //  int dim1 = int.Parse(node.Attributes["Dimension1"].Value, CultureInfo.InvariantCulture.NumberFormat);
     61    //  int dim2 = int.Parse(node.Attributes["Dimension2"].Value, CultureInfo.InvariantCulture.NumberFormat);
     62    //  string[] tokens = node.InnerText.Split(';');
     63    //  double[,] data = new double[dim1, dim2];
     64    //  for(int i = 0; i < dim1; i++) {
     65    //    for(int j = 0; j < dim2; j++) {
     66    //      if(double.TryParse(tokens[i * dim2 + j], NumberStyles.Float, CultureInfo.InvariantCulture.NumberFormat, out data[i, j]) == false) {
     67    //        throw new FormatException("Can't parse " + tokens[i * dim2 + j] + " as double value.");
     68    //      }
     69    //    }
     70    //  }
     71    //  Data = data;
     72    //}
     73    public override void Populate(XmlReader reader, IDictionary<Guid, IStorable> restoredObjects) {
     74      base.Populate(reader, restoredObjects);
     75      int dim1 = int.Parse(reader["Dimension1"], CultureInfo.InvariantCulture.NumberFormat);
     76      int dim2 = int.Parse(reader["Dimension2"], CultureInfo.InvariantCulture.NumberFormat);
     77      string[] tokens = reader.ReadString().Split(';');
    6378      double[,] data = new double[dim1, dim2];
    64       for (int i = 0; i < dim1; i++) {
    65         for (int j = 0; j < dim2; j++) {
    66           if(double.TryParse(tokens[i * dim2 + j], NumberStyles.Float, CultureInfo.InvariantCulture.NumberFormat, out data[i, j])==false) {
     79      for(int i = 0; i < dim1; i++) {
     80        for(int j = 0; j < dim2; j++) {
     81          if(double.TryParse(tokens[i * dim2 + j], NumberStyles.Float, CultureInfo.InvariantCulture.NumberFormat, out data[i, j]) == false) {
    6782            throw new FormatException("Can't parse " + tokens[i * dim2 + j] + " as double value.");
    6883          }
  • branches/XmlTextReaderBranch/HeuristicLab.Data/IntArrayData.cs

    r2 r121  
    5050      return node;
    5151    }
    52     public override void Populate(XmlNode node, IDictionary<Guid,IStorable> restoredObjects) {
    53       base.Populate(node, restoredObjects);
    54       if (!node.InnerText.Equals("")) {
    55         string[] tokens = node.InnerText.Split(';');
     52    //public override void Populate(XmlNode node, IDictionary<Guid, IStorable> restoredObjects) {
     53    //  base.Populate(node, restoredObjects);
     54    //  if(!node.InnerText.Equals("")) {
     55    //    string[] tokens = node.InnerText.Split(';');
     56    //    int[] data = new int[tokens.Length];
     57    //    for(int i = 0; i < data.Length; i++)
     58    //      data[i] = int.Parse(tokens[i], CultureInfo.InvariantCulture.NumberFormat);
     59    //    Data = data;
     60    //  }
     61    //}
     62    public override void Populate(XmlReader reader, IDictionary<Guid, IStorable> restoredObjects) {
     63      base.Populate(reader, restoredObjects);
     64      string innerText = reader.ReadString();
     65      if(!innerText.Equals("")) {
     66        string[] tokens = innerText.Split(';');
    5667        int[] data = new int[tokens.Length];
    57         for (int i = 0; i < data.Length; i++)
     68        for(int i = 0; i < data.Length; i++)
    5869          data[i] = int.Parse(tokens[i], CultureInfo.InvariantCulture.NumberFormat);
    5970        Data = data;
  • branches/XmlTextReaderBranch/HeuristicLab.Data/IntData.cs

    r2 r121  
    5757      return node;
    5858    }
    59     public override void Populate(XmlNode node, IDictionary<Guid,IStorable> restoredObjects) {
    60       base.Populate(node, restoredObjects);
    61       Data = int.Parse(node.InnerText, CultureInfo.InvariantCulture.NumberFormat);
     59    //public override void Populate(XmlNode node, IDictionary<Guid, IStorable> restoredObjects) {
     60    //  base.Populate(node, restoredObjects);
     61    //  Data = int.Parse(node.InnerText, CultureInfo.InvariantCulture.NumberFormat);
     62    //}
     63    public override void Populate(XmlReader reader, IDictionary<Guid, IStorable> restoredObjects) {
     64      base.Populate(reader, restoredObjects);
     65      Data = int.Parse(reader.ReadString(), CultureInfo.InvariantCulture.NumberFormat);
    6266    }
    6367
  • branches/XmlTextReaderBranch/HeuristicLab.Data/IntMatrixData.cs

    r2 r121  
    5656      return node;
    5757    }
    58     public override void Populate(XmlNode node, IDictionary<Guid,IStorable> restoredObjects) {
    59       base.Populate(node, restoredObjects);
    60       int dim1 = int.Parse(node.Attributes["Dimension1"].Value, CultureInfo.InvariantCulture.NumberFormat);
    61       int dim2 = int.Parse(node.Attributes["Dimension2"].Value, CultureInfo.InvariantCulture.NumberFormat);
    62       string[] tokens = node.InnerText.Split(';');
     58    //public override void Populate(XmlNode node, IDictionary<Guid, IStorable> restoredObjects) {
     59    //  base.Populate(node, restoredObjects);
     60    //  int dim1 = int.Parse(node.Attributes["Dimension1"].Value, CultureInfo.InvariantCulture.NumberFormat);
     61    //  int dim2 = int.Parse(node.Attributes["Dimension2"].Value, CultureInfo.InvariantCulture.NumberFormat);
     62    //  string[] tokens = node.InnerText.Split(';');
     63    //  int[,] data = new int[dim1, dim2];
     64    //  for(int i = 0; i < dim1; i++) {
     65    //    for(int j = 0; j < dim2; j++) {
     66    //      data[i, j] = int.Parse(tokens[i * dim2 + j], CultureInfo.InvariantCulture.NumberFormat);
     67    //    }
     68    //  }
     69    //  Data = data;
     70    //}
     71    public override void Populate(XmlReader reader, IDictionary<Guid, IStorable> restoredObjects) {
     72      base.Populate(reader, restoredObjects);
     73      int dim1 = int.Parse(reader["Dimension1"], CultureInfo.InvariantCulture.NumberFormat);
     74      int dim2 = int.Parse(reader["Dimension2"], CultureInfo.InvariantCulture.NumberFormat);
     75      string[] tokens = reader.ReadString().Split(';');
    6376      int[,] data = new int[dim1, dim2];
    64       for (int i = 0; i < dim1; i++) {
    65         for (int j = 0; j < dim2; j++) {
     77      for(int i = 0; i < dim1; i++) {
     78        for(int j = 0; j < dim2; j++) {
    6679          data[i, j] = int.Parse(tokens[i * dim2 + j], CultureInfo.InvariantCulture.NumberFormat);
    6780        }
  • branches/XmlTextReaderBranch/HeuristicLab.Data/ItemList_T.cs

    r69 r121  
    5656      return node;
    5757    }
    58     public override void Populate(XmlNode node, IDictionary<Guid, IStorable> restoredObjects) {
    59       base.Populate(node, restoredObjects);
    60       for (int i = 0; i < node.ChildNodes.Count; i++)
    61         list.Add((T) PersistenceManager.Restore(node.ChildNodes[i], restoredObjects));
     58    //public override void Populate(XmlNode node, IDictionary<Guid, IStorable> restoredObjects) {
     59    //  base.Populate(node, restoredObjects);
     60    //  for(int i = 0; i < node.ChildNodes.Count; i++)
     61    //    list.Add((T)PersistenceManager.Restore(node.ChildNodes[i], restoredObjects));
     62    //}
     63    public override void Populate(XmlReader reader, IDictionary<Guid, IStorable> restoredObjects) {
     64      base.Populate(reader, restoredObjects);
     65      while(reader.IsStartElement())
     66        list.Add((T)PersistenceManager.Restore(reader, restoredObjects));
    6267    }
    6368
  • branches/XmlTextReaderBranch/HeuristicLab.Data/StringData.cs

    r2 r121  
    5656      return node;
    5757    }
    58     public override void Populate(XmlNode node, IDictionary<Guid,IStorable> restoredObjects) {
    59       base.Populate(node, restoredObjects);
    60       Data = node.InnerText;
     58    //public override void Populate(XmlNode node, IDictionary<Guid, IStorable> restoredObjects) {
     59    //  base.Populate(node, restoredObjects);
     60    //  Data = node.InnerText;
     61    //}
     62    public override void Populate(XmlReader reader, IDictionary<Guid, IStorable> restoredObjects) {
     63      base.Populate(reader, restoredObjects);
     64      Data = reader.ReadString();
    6165    }
    6266
  • branches/XmlTextReaderBranch/HeuristicLab.DataAnalysis/Dataset.cs

    r2 r121  
    141141    }
    142142
    143     public override void Populate(XmlNode node, IDictionary<Guid, IStorable> restoredObjects) {
    144       base.Populate(node, restoredObjects);
    145       Name = node.Attributes["Name"].Value;
    146       rows = int.Parse(node.Attributes["Dimension1"].Value, CultureInfo.InvariantCulture.NumberFormat);
    147       columns = int.Parse(node.Attributes["Dimension2"].Value, CultureInfo.InvariantCulture.NumberFormat);
    148      
    149       VariableNames = ParseVariableNamesString(node.Attributes["VariableNames"].Value);
    150 
    151       string[] tokens = node.InnerText.Split(';');
     143    //public override void Populate(XmlNode node, IDictionary<Guid, IStorable> restoredObjects) {
     144    //  base.Populate(node, restoredObjects);
     145    //  Name = node.Attributes["Name"].Value;
     146    //  rows = int.Parse(node.Attributes["Dimension1"].Value, CultureInfo.InvariantCulture.NumberFormat);
     147    //  columns = int.Parse(node.Attributes["Dimension2"].Value, CultureInfo.InvariantCulture.NumberFormat);
     148
     149    //  VariableNames = ParseVariableNamesString(node.Attributes["VariableNames"].Value);
     150
     151    //  string[] tokens = node.InnerText.Split(';');
     152    //  if(tokens.Length != rows * columns) throw new FormatException();
     153    //  samples = new double[rows * columns];
     154    //  for(int row = 0; row < rows; row++) {
     155    //    for(int column = 0; column < columns; column++) {
     156    //      if(double.TryParse(tokens[row * columns + column], NumberStyles.Float, CultureInfo.InvariantCulture.NumberFormat, out samples[row * columns + column]) == false) {
     157    //        throw new FormatException("Can't parse " + tokens[row * columns + column] + " as double value.");
     158    //      }
     159    //    }
     160    //  }
     161    //  CreateDictionaries();
     162    //}
     163    public override void Populate(XmlReader reader, IDictionary<Guid, IStorable> restoredObjects) {
     164      base.Populate(reader, restoredObjects);
     165      Name = reader["Name"];
     166      rows = int.Parse(reader["Dimension1"], CultureInfo.InvariantCulture.NumberFormat);
     167      columns = int.Parse(reader["Dimension2"], CultureInfo.InvariantCulture.NumberFormat);
     168
     169      VariableNames = ParseVariableNamesString(reader["VariableNames"]);
     170
     171      string[] tokens = reader.ReadString().Split(';');
    152172      if(tokens.Length != rows * columns) throw new FormatException();
    153173      samples = new double[rows * columns];
    154174      for(int row = 0; row < rows; row++) {
    155175        for(int column = 0; column < columns; column++) {
    156           if(double.TryParse(tokens[row * columns + column], NumberStyles.Float, CultureInfo.InvariantCulture.NumberFormat, out samples[row*columns + column]) == false) {
     176          if(double.TryParse(tokens[row * columns + column], NumberStyles.Float, CultureInfo.InvariantCulture.NumberFormat, out samples[row * columns + column]) == false) {
    157177            throw new FormatException("Can't parse " + tokens[row * columns + column] + " as double value.");
    158178          }
  • branches/XmlTextReaderBranch/HeuristicLab.DistributedEngine/DistributedEngine.cs

    r36 r121  
    188188      return node;
    189189    }
    190     public override void Populate(XmlNode node, IDictionary<Guid, IStorable> restoredObjects) {
    191       base.Populate(node, restoredObjects);
    192       ServerAddress = node.Attributes["ServerAddress"].Value;
     190    //public override void Populate(XmlNode node, IDictionary<Guid, IStorable> restoredObjects) {
     191    //  base.Populate(node, restoredObjects);
     192    //  ServerAddress = node.Attributes["ServerAddress"].Value;
     193    //}
     194    public override void Populate(XmlReader reader, IDictionary<Guid, IStorable> restoredObjects) {
     195      base.Populate(reader, restoredObjects);
     196      ServerAddress = reader["ServerAddress"];
    193197    }
    194198    #endregion
  • branches/XmlTextReaderBranch/HeuristicLab.ES/ES.cs

    r98 r121  
    606606      return node;
    607607    }
    608     public override void Populate(XmlNode node, IDictionary<Guid, IStorable> restoredObjects) {
    609       base.Populate(node, restoredObjects);
    610       myEngine = (IEngine)PersistenceManager.Restore(node.SelectSingleNode("Engine"), restoredObjects);
     608    //public override void Populate(XmlNode node, IDictionary<Guid, IStorable> restoredObjects) {
     609    //  base.Populate(node, restoredObjects);
     610    //  myEngine = (IEngine)PersistenceManager.Restore(node.SelectSingleNode("Engine"), restoredObjects);
     611    //  SetReferences();
     612    //}
     613    public override void Populate(XmlReader reader, IDictionary<Guid, IStorable> restoredObjects) {
     614      base.Populate(reader, restoredObjects);
     615      myEngine = (IEngine)PersistenceManager.Restore(reader, "Engine", restoredObjects);
    611616      SetReferences();
    612617    }
  • branches/XmlTextReaderBranch/HeuristicLab.Functions/Constant.cs

    r2 r121  
    7373
    7474
    75     public override void Populate(XmlNode node, IDictionary<Guid,IStorable> restoredObjects) {
    76       base.Populate(node, restoredObjects);
     75    //public override void Populate(XmlNode node, IDictionary<Guid, IStorable> restoredObjects) {
     76    //  base.Populate(node, restoredObjects);
     77
     78    //  value = GetVariable("Value");
     79    //}
     80    public override void Populate(XmlReader reader, IDictionary<Guid, IStorable> restoredObjects) {
     81      base.Populate(reader, restoredObjects);
    7782
    7883      value = GetVariable("Value");
  • branches/XmlTextReaderBranch/HeuristicLab.Functions/FunctionBase.cs

    r2 r121  
    308308    }
    309309
    310     public override void Populate(XmlNode node, IDictionary<Guid, IStorable> restoredObjects) {
    311       base.Populate(node, restoredObjects);
    312       XmlNode functionTemplateNode = node.SelectSingleNode("FunctionTemplate");
    313       if (functionTemplateNode != null) {
    314         metaObject = (FunctionBase)PersistenceManager.Restore(functionTemplateNode.ChildNodes[0], restoredObjects);
     310    //public override void Populate(XmlNode node, IDictionary<Guid, IStorable> restoredObjects) {
     311    //  base.Populate(node, restoredObjects);
     312    //  XmlNode functionTemplateNode = node.SelectSingleNode("FunctionTemplate");
     313    //  if(functionTemplateNode != null) {
     314    //    metaObject = (FunctionBase)PersistenceManager.Restore(functionTemplateNode.ChildNodes[0], restoredObjects);
     315    //  } else {
     316    //    metaObject = this;
     317    //  }
     318    //  // don't need to explicitly load the sub-functions because that has already been done in OperatorBase.Populate()
     319
     320    //  // load local variables
     321    //  XmlNode variablesNode = node.SelectSingleNode("LocalVariables");
     322
     323    //  // remove the variables that have been added in a constructor
     324    //  variables.Clear();
     325    //  // load the persisted variables
     326    //  foreach(XmlNode variableNode in variablesNode.ChildNodes)
     327    //    variables.Add((IVariable)PersistenceManager.Restore(variableNode, restoredObjects));
     328    //}
     329    public override void Populate(XmlReader reader, IDictionary<Guid, IStorable> restoredObjects) {
     330      base.Populate(reader, restoredObjects);
     331      if(reader.IsStartElement() && reader.Name == "FunctionTemplate") {
     332        metaObject = (FunctionBase)PersistenceManager.Restore(reader, restoredObjects);
    315333      } else {
    316334        metaObject = this;
     
    319337
    320338      // load local variables
    321       XmlNode variablesNode = node.SelectSingleNode("LocalVariables");
    322      
     339      reader.ReadStartElement("LocalVariables");
    323340      // remove the variables that have been added in a constructor
    324341      variables.Clear();
    325342      // load the persisted variables
    326       foreach (XmlNode variableNode in variablesNode.ChildNodes)
    327         variables.Add((IVariable)PersistenceManager.Restore(variableNode, restoredObjects));
     343      while(reader.IsStartElement())
     344        variables.Add((IVariable)PersistenceManager.Restore(reader, restoredObjects));
     345      reader.ReadEndElement();
    328346    }
    329347
  • branches/XmlTextReaderBranch/HeuristicLab.Functions/Variable.cs

    r2 r121  
    2828using HeuristicLab.Constraints;
    2929using HeuristicLab.DataAnalysis;
     30using System.Xml;
    3031
    3132namespace HeuristicLab.Functions {
     
    9495    }
    9596
    96     public override void Populate(System.Xml.XmlNode node, IDictionary<Guid, IStorable> restoredObjects) {
    97       base.Populate(node, restoredObjects);
     97    //public override void Populate(System.Xml.XmlNode node, IDictionary<Guid, IStorable> restoredObjects) {
     98    //  base.Populate(node, restoredObjects);
     99
     100    //  variable = (ConstrainedIntData)GetVariable("Variable").Value;
     101    //  weight = (ConstrainedDoubleData)GetVariable("Weight").Value;
     102    //  sampleOffset = (ConstrainedIntData)GetVariable("SampleOffset").Value;
     103    //}
     104    public override void Populate(XmlReader reader, IDictionary<Guid, IStorable> restoredObjects) {
     105      base.Populate(reader, restoredObjects);
    98106
    99107      variable = (ConstrainedIntData)GetVariable("Variable").Value;
  • branches/XmlTextReaderBranch/HeuristicLab.Grid/ProcessingEngine.cs

    r27 r121  
    5252    }
    5353
    54     public override void Populate(XmlNode node, IDictionary<Guid, IStorable> restoredObjects) {
    55       base.Populate(node, restoredObjects);
    56       initialOperation = (AtomicOperation)PersistenceManager.Restore(node.SelectSingleNode("InitialOperation"), restoredObjects);
     54    //public override void Populate(XmlNode node, IDictionary<Guid, IStorable> restoredObjects) {
     55    //  base.Populate(node, restoredObjects);
     56    //  initialOperation = (AtomicOperation)PersistenceManager.Restore(node.SelectSingleNode("InitialOperation"), restoredObjects);
     57    //}
     58    public override void Populate(XmlReader reader, IDictionary<Guid, IStorable> restoredObjects) {
     59      base.Populate(reader, restoredObjects);
     60      initialOperation = (AtomicOperation)PersistenceManager.Restore(reader, "InitialOperation", restoredObjects);
    5761    }
    5862
  • branches/XmlTextReaderBranch/HeuristicLab.Logging/Linechart.cs

    r2 r121  
    8989      return node;
    9090    }
    91     public override void Populate(XmlNode node, IDictionary<Guid, IStorable> restoredObjects) {
    92       base.Populate(node, restoredObjects);
    93       myNumberOfLines = (IntData)PersistenceManager.Restore(node.SelectSingleNode("NumberOfLines"), restoredObjects);
    94       myValues = (ItemList)PersistenceManager.Restore(node.SelectSingleNode("Values"), restoredObjects);
     91    //public override void Populate(XmlNode node, IDictionary<Guid, IStorable> restoredObjects) {
     92    //  base.Populate(node, restoredObjects);
     93    //  myNumberOfLines = (IntData)PersistenceManager.Restore(node.SelectSingleNode("NumberOfLines"), restoredObjects);
     94    //  myValues = (ItemList)PersistenceManager.Restore(node.SelectSingleNode("Values"), restoredObjects);
     95    //}
     96    public override void Populate(XmlReader reader, IDictionary<Guid, IStorable> restoredObjects) {
     97      base.Populate(reader, restoredObjects);
     98      myNumberOfLines = (IntData)PersistenceManager.Restore(reader, "NumberOfLines", restoredObjects);
     99      myValues = (ItemList)PersistenceManager.Restore(reader, "Values", restoredObjects);
    95100    }
    96101    #endregion
  • branches/XmlTextReaderBranch/HeuristicLab.Logging/Log.cs

    r2 r121  
    6464      return node;
    6565    }
    66     public override void Populate(XmlNode node, IDictionary<Guid, IStorable> restoredObjects) {
    67       base.Populate(node, restoredObjects);
    68       myItems = (ItemList)PersistenceManager.Restore(node.SelectSingleNode("Items"), restoredObjects);
     66    //public override void Populate(XmlNode node, IDictionary<Guid, IStorable> restoredObjects) {
     67    //  base.Populate(node, restoredObjects);
     68    //  myItems = (ItemList)PersistenceManager.Restore(node.SelectSingleNode("Items"), restoredObjects);
     69    //}
     70    public override void Populate(XmlReader reader, IDictionary<Guid, IStorable> restoredObjects) {
     71      base.Populate(reader, restoredObjects);
     72      myItems = (ItemList)PersistenceManager.Restore(reader, "Items", restoredObjects);
    6973    }
    7074    #endregion
  • branches/XmlTextReaderBranch/HeuristicLab.Operators.Programmable/ProgrammableOperator.cs

    r117 r121  
    202202      return node;
    203203    }
    204     public override void Populate(XmlNode node, IDictionary<Guid, IStorable> restoredObjects) {
    205       base.Populate(node, restoredObjects);
    206       XmlNode descriptionNode = node.SelectSingleNode("Description");
    207       myDescription = descriptionNode.InnerText;
    208       XmlNode codeNode = node.SelectSingleNode("Code");
    209       myCode = codeNode.InnerText;
     204    //public override void Populate(XmlNode node, IDictionary<Guid, IStorable> restoredObjects) {
     205    //  base.Populate(node, restoredObjects);
     206    //  XmlNode descriptionNode = node.SelectSingleNode("Description");
     207    //  myDescription = descriptionNode.InnerText;
     208    //  XmlNode codeNode = node.SelectSingleNode("Code");
     209    //  myCode = codeNode.InnerText;
     210    //}
     211    public override void Populate(XmlReader reader, IDictionary<Guid, IStorable> restoredObjects) {
     212      base.Populate(reader, restoredObjects);
     213      reader.ReadStartElement("Description");
     214      myDescription = reader.ReadString();
     215      reader.ReadEndElement();
     216      reader.ReadStartElement("Code");
     217      myCode = reader.ReadString();
     218      reader.ReadEndElement();
    210219    }
    211220    #endregion
  • branches/XmlTextReaderBranch/HeuristicLab.Operators/CombinedOperator.cs

    r89 r121  
    9696      return node;
    9797    }
    98     public override void Populate(XmlNode node, IDictionary<Guid, IStorable> restoredObjects) {
    99       base.Populate(node, restoredObjects);
    100       XmlNode descriptionNode = node.SelectSingleNode("Description");
    101       if (descriptionNode != null) myDescription = descriptionNode.InnerText;
    102       myOperatorGraph = (IOperatorGraph)PersistenceManager.Restore(node.SelectSingleNode("OperatorGraph"), restoredObjects);
     98    //public override void Populate(XmlNode node, IDictionary<Guid, IStorable> restoredObjects) {
     99    //  base.Populate(node, restoredObjects);
     100    //  XmlNode descriptionNode = node.SelectSingleNode("Description");
     101    //  if(descriptionNode != null) myDescription = descriptionNode.InnerText;
     102    //  myOperatorGraph = (IOperatorGraph)PersistenceManager.Restore(node.SelectSingleNode("OperatorGraph"), restoredObjects);
     103    //}
     104    public override void Populate(XmlReader reader, IDictionary<Guid, IStorable> restoredObjects) {
     105      base.Populate(reader, restoredObjects);
     106      if(reader.IsStartElement() && reader.Name == "Description") {
     107        reader.ReadStartElement("Description");
     108        myDescription = reader.ReadString();
     109        reader.ReadEndElement();
     110      }
     111      myOperatorGraph = (IOperatorGraph)PersistenceManager.Restore(reader, "OperatorGraph", restoredObjects);
    103112    }
    104113    #endregion
  • branches/XmlTextReaderBranch/HeuristicLab.Random/MersenneTwister.cs

    r2 r121  
    130130      return node;
    131131    }
    132     public override void Populate(XmlNode node, IDictionary<Guid,IStorable> restoredObjects) {
    133       base.Populate(node, restoredObjects);
    134 
    135       string stateString = node.SelectSingleNode("State").InnerText;
     132    //public override void Populate(XmlNode node, IDictionary<Guid, IStorable> restoredObjects) {
     133    //  base.Populate(node, restoredObjects);
     134
     135    //  string stateString = node.SelectSingleNode("State").InnerText;
     136    //  string[] tokens = stateString.Split(';');
     137    //  for(int i = 0; i < tokens.Length; i++)
     138    //    state[i] = uint.Parse(tokens[i]);
     139    //  p = int.Parse(node.SelectSingleNode("P").InnerText);
     140    //  init = bool.Parse(node.SelectSingleNode("Init").InnerText);
     141    //}
     142    public override void Populate(XmlReader reader, IDictionary<Guid, IStorable> restoredObjects) {
     143      base.Populate(reader, restoredObjects);
     144
     145      reader.ReadStartElement("State");
     146      string stateString = reader.ReadString();
     147      reader.ReadEndElement();
    136148      string[] tokens = stateString.Split(';');
    137       for (int i = 0; i < tokens.Length; i++)
     149      for(int i = 0; i < tokens.Length; i++)
    138150        state[i] = uint.Parse(tokens[i]);
    139       p = int.Parse(node.SelectSingleNode("P").InnerText);
    140       init = bool.Parse(node.SelectSingleNode("Init").InnerText);
     151      reader.ReadStartElement("P");
     152      p = int.Parse(reader.ReadString());
     153      reader.ReadEndElement();
     154      reader.ReadStartElement("Init");
     155      init = bool.Parse(reader.ReadString());
     156      reader.ReadEndElement();
    141157    }
    142158    #endregion
  • branches/XmlTextReaderBranch/HeuristicLab.Random/NormalDistributedRandom.cs

    r2 r121  
    529529    }
    530530
    531     public override void Populate(XmlNode node, IDictionary<Guid, IStorable> restoredObjects) {
    532       base.Populate(node, restoredObjects);
    533 
    534       mu = double.Parse(node.SelectSingleNode("Mu").InnerText);
    535       sigma = double.Parse(node.SelectSingleNode("Sigma").InnerText);
    536       uniform = (IRandom)PersistenceManager.Restore(node.SelectSingleNode("UniformRandom"), restoredObjects);
     531    //public override void Populate(XmlNode node, IDictionary<Guid, IStorable> restoredObjects) {
     532    //  base.Populate(node, restoredObjects);
     533
     534    //  mu = double.Parse(node.SelectSingleNode("Mu").InnerText);
     535    //  sigma = double.Parse(node.SelectSingleNode("Sigma").InnerText);
     536    //  uniform = (IRandom)PersistenceManager.Restore(node.SelectSingleNode("UniformRandom"), restoredObjects);
     537    //}
     538    public override void Populate(XmlReader reader, IDictionary<Guid, IStorable> restoredObjects) {
     539      base.Populate(reader, restoredObjects);
     540      reader.ReadStartElement("Mu");
     541      mu = double.Parse(reader.ReadString());
     542      reader.ReadEndElement();
     543      reader.ReadStartElement("Sigma");
     544      sigma = double.Parse(reader.ReadString());
     545      reader.ReadEndElement();
     546      uniform = (IRandom)PersistenceManager.Restore(reader, "UniformRandom", restoredObjects);
    537547    }
    538548
  • branches/XmlTextReaderBranch/HeuristicLab.Routing.TSP/TSPTour.cs

    r2 r121  
    7878      return node;
    7979    }
    80     public override void Populate(XmlNode node, IDictionary<Guid, IStorable> restoredObjects) {
    81       base.Populate(node, restoredObjects);
    82       myCoordinates = (DoubleMatrixData)PersistenceManager.Restore(node.SelectSingleNode("Coordinates"), restoredObjects);
    83       myTour = (Permutation.Permutation)PersistenceManager.Restore(node.SelectSingleNode("Tour"), restoredObjects);
     80    //public override void Populate(XmlNode node, IDictionary<Guid, IStorable> restoredObjects) {
     81    //  base.Populate(node, restoredObjects);
     82    //  myCoordinates = (DoubleMatrixData)PersistenceManager.Restore(node.SelectSingleNode("Coordinates"), restoredObjects);
     83    //  myTour = (Permutation.Permutation)PersistenceManager.Restore(node.SelectSingleNode("Tour"), restoredObjects);
     84    //}
     85    public override void Populate(XmlReader reader, IDictionary<Guid, IStorable> restoredObjects) {
     86      base.Populate(reader, restoredObjects);
     87      myCoordinates = (DoubleMatrixData)PersistenceManager.Restore(reader, "Coordinates", restoredObjects);
     88      myTour = (Permutation.Permutation)PersistenceManager.Restore(reader, "Tour", restoredObjects);
    8489    }
    8590    #endregion
  • branches/XmlTextReaderBranch/HeuristicLab.SGA/SGA.cs

    r65 r121  
    511511      return node;
    512512    }
    513     public override void Populate(XmlNode node, IDictionary<Guid,IStorable> restoredObjects) {
    514       base.Populate(node, restoredObjects);
    515       myEngine = (IEngine)PersistenceManager.Restore(node.SelectSingleNode("Engine"), restoredObjects);
     513    //public override void Populate(XmlNode node, IDictionary<Guid, IStorable> restoredObjects) {
     514    //  base.Populate(node, restoredObjects);
     515    //  myEngine = (IEngine)PersistenceManager.Restore(node.SelectSingleNode("Engine"), restoredObjects);
     516    //  SetReferences();
     517    //}
     518    public override void Populate(XmlReader reader, IDictionary<Guid, IStorable> restoredObjects) {
     519      base.Populate(reader, restoredObjects);
     520      myEngine = (IEngine)PersistenceManager.Restore(reader, "Engine", restoredObjects);
    516521      SetReferences();
    517522    }
  • branches/XmlTextReaderBranch/HeuristicLab.Scheduling.JSSP/JSSPInjector.cs

    r120 r121  
    8888      return node;
    8989    }
    90     public override void Populate(XmlNode node, IDictionary<Guid,IStorable> restoredObjects) {
    91       base.Populate(node, restoredObjects);
    92       operations = (ItemList)PersistenceManager.Restore(node.SelectSingleNode("Operations"), restoredObjects);
    93       jobs = (IntData)PersistenceManager.Restore(node.SelectSingleNode("Jobs"), restoredObjects);
    94       machines = (IntData)PersistenceManager.Restore(node.SelectSingleNode("Machines"), restoredObjects);
     90    //public override void Populate(XmlNode node, IDictionary<Guid, IStorable> restoredObjects) {
     91    //  base.Populate(node, restoredObjects);
     92    //  operations = (ItemList)PersistenceManager.Restore(node.SelectSingleNode("Operations"), restoredObjects);
     93    //  jobs = (IntData)PersistenceManager.Restore(node.SelectSingleNode("Jobs"), restoredObjects);
     94    //  machines = (IntData)PersistenceManager.Restore(node.SelectSingleNode("Machines"), restoredObjects);
     95    //}
     96    public override void Populate(XmlReader reader, IDictionary<Guid, IStorable> restoredObjects) {
     97      base.Populate(reader, restoredObjects);
     98      operations = (ItemList)PersistenceManager.Restore(reader, "Operations", restoredObjects);
     99      jobs = (IntData)PersistenceManager.Restore(reader, "Jobs", restoredObjects);
     100      machines = (IntData)PersistenceManager.Restore(reader, "Machines", restoredObjects);
    95101    }
    96102    #endregion
  • branches/XmlTextReaderBranch/HeuristicLab.Scheduling.JSSP/Operation.cs

    r2 r121  
    150150    }
    151151
    152     public override void Populate(XmlNode node, IDictionary<Guid,IStorable> restoredObjects) {
    153       base.Populate(node, restoredObjects);
    154       job = (IntData)PersistenceManager.Restore(node.SelectSingleNode("Job"), restoredObjects);
    155       operationIndex = (IntData)PersistenceManager.Restore(node.SelectSingleNode("OperationIndex"), restoredObjects);
    156       start = (IntData)PersistenceManager.Restore(node.SelectSingleNode("Start"), restoredObjects);
    157       duration = (IntData)PersistenceManager.Restore(node.SelectSingleNode("Duration"), restoredObjects);
    158       predecessors = (ItemList)PersistenceManager.Restore(node.SelectSingleNode("Predecessors"), restoredObjects);
    159       machines = (IntArrayData)PersistenceManager.Restore(node.SelectSingleNode("Machines"), restoredObjects);
     152    //public override void Populate(XmlNode node, IDictionary<Guid, IStorable> restoredObjects) {
     153    //  base.Populate(node, restoredObjects);
     154    //  job = (IntData)PersistenceManager.Restore(node.SelectSingleNode("Job"), restoredObjects);
     155    //  operationIndex = (IntData)PersistenceManager.Restore(node.SelectSingleNode("OperationIndex"), restoredObjects);
     156    //  start = (IntData)PersistenceManager.Restore(node.SelectSingleNode("Start"), restoredObjects);
     157    //  duration = (IntData)PersistenceManager.Restore(node.SelectSingleNode("Duration"), restoredObjects);
     158    //  predecessors = (ItemList)PersistenceManager.Restore(node.SelectSingleNode("Predecessors"), restoredObjects);
     159    //  machines = (IntArrayData)PersistenceManager.Restore(node.SelectSingleNode("Machines"), restoredObjects);
     160    //}
     161    public override void Populate(XmlReader reader, IDictionary<Guid, IStorable> restoredObjects) {
     162      base.Populate(reader, restoredObjects);
     163      job = (IntData)PersistenceManager.Restore(reader, "Job", restoredObjects);
     164      operationIndex = (IntData)PersistenceManager.Restore(reader, "OperationIndex", restoredObjects);
     165      start = (IntData)PersistenceManager.Restore(reader, "Start", restoredObjects);
     166      duration = (IntData)PersistenceManager.Restore(reader, "Duration", restoredObjects);
     167      predecessors = (ItemList)PersistenceManager.Restore(reader, "Predecessors", restoredObjects);
     168      machines = (IntArrayData)PersistenceManager.Restore(reader, "Machines", restoredObjects);
    160169    }
    161170
  • branches/XmlTextReaderBranch/HeuristicLab.Scheduling.JSSP/Schedule.cs

    r2 r121  
    7777    }
    7878
    79     public override void Populate(XmlNode node, IDictionary<Guid, IStorable> restoredObjects) {
    80       base.Populate(node, restoredObjects);
    81       int machines = int.Parse(node.Attributes["Machines"].Value);
     79    //public override void Populate(XmlNode node, IDictionary<Guid, IStorable> restoredObjects) {
     80    //  base.Populate(node, restoredObjects);
     81    //  int machines = int.Parse(node.Attributes["Machines"].Value);
     82    //  schedule = new ScheduleTree[machines];
     83    //  for(int i = 0; i < machines; i++) {
     84    //    schedule[i] = (ScheduleTree)PersistenceManager.Restore(node.SelectSingleNode("Machine" + i.ToString()), restoredObjects);
     85    //  }
     86    //}
     87    public override void Populate(XmlReader reader, IDictionary<Guid, IStorable> restoredObjects) {
     88      base.Populate(reader, restoredObjects);
     89      int machines = int.Parse(reader["Machines"]);
    8290      schedule = new ScheduleTree[machines];
    8391      for(int i = 0; i < machines; i++) {
    84         schedule[i] = (ScheduleTree)PersistenceManager.Restore(node.SelectSingleNode("Machine" + i.ToString()), restoredObjects);
     92        schedule[i] = (ScheduleTree)PersistenceManager.Restore(reader, "Machine" + i.ToString(), restoredObjects);
    8593      }
    8694    }
  • branches/XmlTextReaderBranch/HeuristicLab.Scheduling.JSSP/ScheduleInjector.cs

    r77 r121  
    7171      return node;
    7272    }
    73     public override void Populate(XmlNode node, IDictionary<Guid,IStorable> restoredObjects) {
    74       base.Populate(node, restoredObjects);
    75       XmlNode scheduleNode = node.SelectSingleNode("Schedule");
    76       if(scheduleNode != null) {
    77         schedule = (Schedule)PersistenceManager.Restore(scheduleNode, restoredObjects);
    78       }
     73    //public override void Populate(XmlNode node, IDictionary<Guid, IStorable> restoredObjects) {
     74    //  base.Populate(node, restoredObjects);
     75    //  XmlNode scheduleNode = node.SelectSingleNode("Schedule");
     76    //  if(scheduleNode != null) {
     77    //    schedule = (Schedule)PersistenceManager.Restore(scheduleNode, restoredObjects);
     78    //  }
     79    //}
     80    public override void Populate(XmlReader reader, IDictionary<Guid, IStorable> restoredObjects) {
     81      base.Populate(reader, restoredObjects);
     82      if(reader.IsStartElement())
     83        schedule = (Schedule)PersistenceManager.Restore(reader, "Schedule", restoredObjects);
    7984    }
    8085    #endregion
  • branches/XmlTextReaderBranch/HeuristicLab.Scheduling.JSSP/ScheduleTree.cs

    r2 r121  
    214214    }
    215215
    216     public override void Populate(XmlNode node, IDictionary<Guid,IStorable> restoredObjects) {
    217       base.Populate(node, restoredObjects);
    218       string[] tokens = node.InnerText.Split(';');
     216    //public override void Populate(XmlNode node, IDictionary<Guid, IStorable> restoredObjects) {
     217    //  base.Populate(node, restoredObjects);
     218    //  string[] tokens = node.InnerText.Split(';');
     219    //  for(int i = 0; i < tokens.Length - 1; i++) {
     220    //    TimeSlot t = new TimeSlot(tokens[i]);
     221    //    if(t.job > -1) {
     222    //      this.InsertOperation(t);
     223    //    }
     224    //  }
     225    //}
     226    public override void Populate(XmlReader reader, IDictionary<Guid, IStorable> restoredObjects) {
     227      base.Populate(reader, restoredObjects);
     228      string[] tokens = reader.ReadString().Split(';');
    219229      for(int i = 0; i < tokens.Length - 1; i++) {
    220230        TimeSlot t = new TimeSlot(tokens[i]);
  • branches/XmlTextReaderBranch/HeuristicLab.StructureIdentification/GPOperatorLibrary.cs

    r2 r121  
    7373    }
    7474
    75     public override void Populate(System.Xml.XmlNode node, IDictionary<Guid, IStorable> restoredObjects) {
    76       base.Populate(node, restoredObjects);
    77       group = (GPOperatorGroup) PersistenceManager.Restore(node.SelectSingleNode("Group"), restoredObjects);
     75    //public override void Populate(System.Xml.XmlNode node, IDictionary<Guid, IStorable> restoredObjects) {
     76    //  base.Populate(node, restoredObjects);
     77    //  group = (GPOperatorGroup)PersistenceManager.Restore(node.SelectSingleNode("Group"), restoredObjects);
     78    //}
     79    public override void Populate(XmlReader reader, IDictionary<Guid, IStorable> restoredObjects) {
     80      base.Populate(reader, restoredObjects);
     81      group = (GPOperatorGroup)PersistenceManager.Restore(reader, "Group", restoredObjects);
    7882    }
    7983    #endregion
  • branches/XmlTextReaderBranch/HeuristicLab.TestFunctions/HeuristicLab.TestFunctions.csproj

    r106 r121  
    8484    <EmbeddedResource Include="TestFunctionInjectorView.resx">
    8585      <DependentUpon>TestFunctionInjectorView.cs</DependentUpon>
     86      <SubType>Designer</SubType>
    8687    </EmbeddedResource>
    8788  </ItemGroup>
  • branches/XmlTextReaderBranch/HeuristicLab.ThreadParallelEngine/ThreadParallelEngine.cs

    r2 r121  
    183183      return node;
    184184    }
    185     public override void Populate(XmlNode node, IDictionary<Guid, IStorable> restoredObjects) {
    186       base.Populate(node, restoredObjects);
    187       myWorkers = int.Parse(node.Attributes["Workers"].Value);
     185    //public override void Populate(XmlNode node, IDictionary<Guid, IStorable> restoredObjects) {
     186    //  base.Populate(node, restoredObjects);
     187    //  myWorkers = int.Parse(node.Attributes["Workers"].Value);
     188    //}
     189    public override void Populate(XmlReader reader, IDictionary<Guid, IStorable> restoredObjects) {
     190      base.Populate(reader, restoredObjects);
     191      myWorkers = int.Parse(reader["Workers"]);
    188192    }
    189193    #endregion
Note: See TracChangeset for help on using the changeset viewer.