Changeset 14927 for branches/PersistenceReintegration/HeuristicLab.Persistence/3.3/Default/CompositeSerializers/DictionarySerializer.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/DictionarySerializer.cs
r14185 r14927 25 25 using HeuristicLab.Persistence.Auxiliary; 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("813d9a0f-a611-478e-8149-e5d338c9a273")] 33 33 internal sealed class DictionarySerializer : ICompositeSerializer { 34 34 … … 79 79 dict.Add(key.Value, value.Value); 80 80 } 81 } 82 catch (InvalidOperationException e) { 81 } catch (InvalidOperationException e) { 83 82 throw new PersistenceException("Dictionaries must contain an even number of elements (key+value).", e); 84 } 85 catch (NotSupportedException e) { 83 } catch (NotSupportedException e) { 86 84 throw new PersistenceException("The serialized dictionary type was read-only or had a fixed size and cannot be deserialized.", e); 87 } 88 catch (ArgumentNullException e) { 85 } catch (ArgumentNullException e) { 89 86 throw new PersistenceException("Dictionary key was null.", e); 90 } 91 catch (ArgumentException e) { 87 } catch (ArgumentException e) { 92 88 throw new PersistenceException("Duplicate dictionary key.", e); 93 89 }
Note: See TracChangeset
for help on using the changeset viewer.