Changeset 5324 for trunk/sources/HeuristicLab.Persistence/3.3/Default/CompositeSerializers/Storable/StorableSerializer.cs
- Timestamp:
- 01/18/11 15:50:23 (14 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/sources/HeuristicLab.Persistence/3.3/Default/CompositeSerializers/Storable/StorableSerializer.cs
r5292 r5324 118 118 public IEnumerable<Tag> Decompose(object obj) { 119 119 foreach (var accessor in GetStorableAccessors(obj.GetType())) { 120 yield return new Tag(accessor.Name, accessor.Get(obj)); 120 if (accessor.Get != null) 121 yield return new Tag(accessor.Name, accessor.Get(obj)); 121 122 } 122 123 } … … 151 152 } 152 153 foreach (var accessor in GetStorableAccessors(instance.GetType())) { 153 if (memberDict.ContainsKey(accessor.Name)) { 154 accessor.Set(instance, memberDict[accessor.Name].Value); 155 } else if (accessor.DefaultValue != null) { 156 accessor.Set(instance, accessor.DefaultValue); 154 if (accessor.Set != null) { 155 if (memberDict.ContainsKey(accessor.Name)) { 156 accessor.Set(instance, memberDict[accessor.Name].Value); 157 } else if (accessor.DefaultValue != null) { 158 accessor.Set(instance, accessor.DefaultValue); 159 } 157 160 } 158 161 }
Note: See TracChangeset
for help on using the changeset viewer.