Changeset 1625 for trunk/sources/HeuristicLab.Persistence/3.3/Default/Decomposers/Storable/DataMemberAccessor.cs
- Timestamp:
- 04/23/09 14:22:29 (15 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/sources/HeuristicLab.Persistence/3.3/Default/Decomposers/Storable/DataMemberAccessor.cs
r1623 r1625 1 1 using System; 2 2 using System.Reflection; 3 using HeuristicLab.Persistence.Core; 3 4 4 5 namespace HeuristicLab.Persistence.Default.Decomposers.Storable { … … 22 23 PropertyInfo propertyInfo = (PropertyInfo)memberInfo; 23 24 if (!propertyInfo.CanRead || !propertyInfo.CanWrite) { 24 throw new NotSupportedException(25 throw new PersistenceException( 25 26 "Storable properties must implement both a Get and a Set Accessor. "); 26 27 } … … 28 29 Set = value => propertyInfo.SetValue(obj, value, null); 29 30 } else { 30 throw new NotSupportedException(31 throw new PersistenceException( 31 32 "The Storable attribute can only be applied to fields and properties."); 32 33 }
Note: See TracChangeset
for help on using the changeset viewer.