Changeset 1553 for trunk/sources/HeuristicLab.Persistence/3.3/Default/Decomposers/StorableDecomposer.cs
- Timestamp:
- 04/14/09 13:23:08 (15 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/sources/HeuristicLab.Persistence/3.3/Default/Decomposers/StorableDecomposer.cs
r1542 r1553 17 17 EmptyStorableClassAttribute.IsEmpyStorable(type); 18 18 19 } 19 } 20 21 public IEnumerable<Tag> CreateMetaInfo(object o) { 22 return new Tag[] { }; 23 } 20 24 21 25 public IEnumerable<Tag> Decompose(object obj) { … … 25 29 } 26 30 27 public object CreateInstance(Type type ) {31 public object CreateInstance(Type type, IEnumerable<Tag> metaInfo) { 28 32 return Activator.CreateInstance(type, true); 29 33 } 30 34 31 public objectPopulate(object instance, IEnumerable<Tag> objects, Type type) {35 public void Populate(object instance, IEnumerable<Tag> objects, Type type) { 32 36 var memberDict = new Dictionary<string, Tag>(); 33 37 IEnumerator<Tag> iter = objects.GetEnumerator(); … … 37 41 foreach (var mapping in StorableAttribute.GetAutostorableAccessors(instance)) { 38 42 if (memberDict.ContainsKey(mapping.Key)) { 39 m emberDict[mapping.Key].SafeSet(mapping.Value.Set);43 mapping.Value.Set(memberDict[mapping.Key].Value); 40 44 } else if (mapping.Value.DefaultValue != null) { 41 45 mapping.Value.Set(mapping.Value.DefaultValue); 42 46 } 43 47 } 44 return instance;45 48 } 46 47 49 } 48 50 }
Note: See TracChangeset
for help on using the changeset viewer.