Changeset 1705 for trunk/sources/HeuristicLab.Persistence/3.3/Default/Decomposers/DictionaryDecomposer.cs
- Timestamp:
- 04/29/09 15:32:59 (15 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/sources/HeuristicLab.Persistence/3.3/Default/Decomposers/DictionaryDecomposer.cs
r1625 r1705 5 5 using System.Collections.Generic; 6 6 using HeuristicLab.Persistence.Default.Decomposers.Storable; 7 using HeuristicLab.Persistence.Auxiliary; 7 8 8 9 namespace HeuristicLab.Persistence.Default.Decomposers { … … 17 18 18 19 public bool CanDecompose(Type type) { 19 return type.GetInterface(typeof(IDictionary).FullName) != null; 20 return ReflectionTools.HasDefaultConstructor(type) && 21 type.GetInterface(typeof(IDictionary).FullName) != null; 20 22 } 21 23 … … 54 56 } catch (ArgumentException e) { 55 57 throw new PersistenceException("Duplicate dictionary key.", e); 56 } 58 } 57 59 } 58 60 }
Note: See TracChangeset
for help on using the changeset viewer.