Free cookie consent management tool by TermsFeed Policy Generator

Ignore:
Timestamp:
03/25/09 17:16:32 (15 years ago)
Author:
epitzer
Message:

Implement persistence of storables as decomposer. (#506)

File:
1 edited

Legend:

Unmodified
Added
Removed
  • branches/New Persistence Exploration/Persistence/Persistence/Core/Serializer.cs

    r1404 r1419  
    6767    public IEnumerator<ISerializationToken> GetEnumerator() {
    6868      DataMemberAccessor rootAccessor = new DataMemberAccessor(
    69         rootName, obj.GetType(), null, () => obj, null);
     69        rootName, null, () => obj, null);
    7070      IEnumerator<ISerializationToken> iterator = Serialize(rootAccessor);
    7171      while (iterator.MoveNext())
     
    110110
    111111    private IEnumerator<ISerializationToken> CompositeEnumerator(string name,
    112         IEnumerable values, int? id, int typeId) {
     112        IEnumerable<Tag> tags, int? id, int typeId) {
    113113      yield return new BeginToken(name, typeId, id);     
    114         foreach (object o in values) {
    115           IEnumerator<ISerializationToken> iterator = Serialize(new DataMemberAccessor(o));
     114        foreach (var tag in tags) {
     115          IEnumerator<ISerializationToken> iterator = Serialize(           
     116            new DataMemberAccessor(tag.Value, tag.Name));
    116117          while (iterator.MoveNext())
    117118            yield return iterator.Current;
     
    132133        }
    133134      }
    134       if (nSubComponents == 0 && ! EmptyStorableClassAttribute.IsEmpyStorable(value)) {
     135      if (nSubComponents == 0 && ! EmptyStorableClassAttribute.IsEmpyStorable(value.GetType())) {
    135136        throw new ApplicationException(
    136137          String.Format(
Note: See TracChangeset for help on using the changeset viewer.