Free cookie consent management tool by TermsFeed Policy Generator

Ignore:
Timestamp:
05/04/17 17:19:35 (7 years ago)
Author:
gkronber
Message:

#2520: changed all usages of StorableClass to use StorableType with an auto-generated GUID (did not add StorableType to other type definitions yet)

File:
1 edited

Legend:

Unmodified
Added
Removed
  • branches/PersistenceReintegration/HeuristicLab.Persistence/3.3/Default/CompositeSerializers/KeyValuePairSerializer.cs

    r14185 r14927  
    2525using System.Reflection;
    2626using HeuristicLab.Persistence.Core;
    27 using HeuristicLab.Persistence.Default.CompositeSerializers.Storable;
     27using HeuristicLab.Persistence;
    2828using HeuristicLab.Persistence.Interfaces;
    2929
    3030namespace HeuristicLab.Persistence.Default.CompositeSerializers {
    3131
    32   [StorableClass]
     32  [StorableType("97d00efc-4eb0-4dc7-a58c-977c45c2904c")]
    3333  internal sealed class KeyValuePairSerializer : ICompositeSerializer {
    3434
     
    6464      try {
    6565        key = new Tag("key", t.GetProperty("Key").GetValue(o, null));
    66       }
    67       catch (Exception e) {
     66      } catch (Exception e) {
    6867        throw new PersistenceException("Exception caught during KeyValuePair decomposition", e);
    6968      }
     
    7170      try {
    7271        value = new Tag("value", t.GetProperty("Value").GetValue(o, null));
    73       }
    74       catch (Exception e) {
     72      } catch (Exception e) {
    7573        throw new PersistenceException("Exception caught during KeyValuePair decomposition", e);
    7674      }
     
    9189        t.GetFields(BindingFlags.Instance | BindingFlags.Public | BindingFlags.NonPublic)
    9290          .Single(fi => fi.Name == "value").SetValue(instance, iter.Current.Value);
    93       }
    94       catch (InvalidOperationException e) {
     91      } catch (InvalidOperationException e) {
    9592        throw new PersistenceException("Not enough components to populate KeyValuePair instance", e);
    96       }
    97       catch (Exception e) {
     93      } catch (Exception e) {
    9894        throw new PersistenceException("Exception caught during KeyValuePair reconstruction", e);
    9995      }
Note: See TracChangeset for help on using the changeset viewer.