Changeset 14927 for branches/PersistenceReintegration/HeuristicLab.Persistence/3.3/Default/CompositeSerializers/KeyValuePairSerializer.cs
- Timestamp:
- 05/04/17 17:19:35 (7 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
branches/PersistenceReintegration/HeuristicLab.Persistence/3.3/Default/CompositeSerializers/KeyValuePairSerializer.cs
r14185 r14927 25 25 using System.Reflection; 26 26 using HeuristicLab.Persistence.Core; 27 using HeuristicLab.Persistence .Default.CompositeSerializers.Storable;27 using HeuristicLab.Persistence; 28 28 using HeuristicLab.Persistence.Interfaces; 29 29 30 30 namespace HeuristicLab.Persistence.Default.CompositeSerializers { 31 31 32 [Storable Class]32 [StorableType("97d00efc-4eb0-4dc7-a58c-977c45c2904c")] 33 33 internal sealed class KeyValuePairSerializer : ICompositeSerializer { 34 34 … … 64 64 try { 65 65 key = new Tag("key", t.GetProperty("Key").GetValue(o, null)); 66 } 67 catch (Exception e) { 66 } catch (Exception e) { 68 67 throw new PersistenceException("Exception caught during KeyValuePair decomposition", e); 69 68 } … … 71 70 try { 72 71 value = new Tag("value", t.GetProperty("Value").GetValue(o, null)); 73 } 74 catch (Exception e) { 72 } catch (Exception e) { 75 73 throw new PersistenceException("Exception caught during KeyValuePair decomposition", e); 76 74 } … … 91 89 t.GetFields(BindingFlags.Instance | BindingFlags.Public | BindingFlags.NonPublic) 92 90 .Single(fi => fi.Name == "value").SetValue(instance, iter.Current.Value); 93 } 94 catch (InvalidOperationException e) { 91 } catch (InvalidOperationException e) { 95 92 throw new PersistenceException("Not enough components to populate KeyValuePair instance", e); 96 } 97 catch (Exception e) { 93 } catch (Exception e) { 98 94 throw new PersistenceException("Exception caught during KeyValuePair reconstruction", e); 99 95 }
Note: See TracChangeset
for help on using the changeset viewer.