Changeset 2736
- Timestamp:
- 02/02/10 16:16:36 (15 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
branches/Persistence Test/HeuristicLab.Persistence/3.3/Core/Serializer.cs
r2106 r2736 84 84 85 85 public Serializer(object obj, Configuration configuration, string rootName, bool isTestRun) { 86 87 86 this.obj = obj; 88 87 this.rootName = rootName; … … 174 173 yield return new BeginToken(name, typeId, id); 175 174 bool first = true; 176 foreach (var tag in metaInfo) { 177 IEnumerator<ISerializationToken> metaIt = Serialize(new DataMemberAccessor(tag.Value, tag.Name)); 178 while (metaIt.MoveNext()) { 179 if (first) { 180 yield return new MetaInfoBeginToken(); 181 first = false; 175 if (metaInfo != null) { 176 foreach (var tag in metaInfo) { 177 IEnumerator<ISerializationToken> metaIt = Serialize(new DataMemberAccessor(tag.Value, tag.Name)); 178 while (metaIt.MoveNext()) { 179 if (first) { 180 yield return new MetaInfoBeginToken(); 181 first = false; 182 } 183 yield return metaIt.Current; 182 184 } 183 yield return metaIt.Current;184 185 } 185 186 } … … 187 188 yield return new MetaInfoEndToken(); 188 189 } 189 foreach (var tag in tags) { 190 IEnumerator<ISerializationToken> it = Serialize(new DataMemberAccessor(tag.Value, tag.Name)); 191 while (it.MoveNext()) 192 yield return it.Current; 190 if (tags != null) { 191 foreach (var tag in tags) { 192 IEnumerator<ISerializationToken> it = Serialize(new DataMemberAccessor(tag.Value, tag.Name)); 193 while (it.MoveNext()) 194 yield return it.Current; 195 } 193 196 } 194 197 yield return new EndToken(name, typeId, id);
Note: See TracChangeset
for help on using the changeset viewer.