- Timestamp:
- 06/16/17 11:32:56 (7 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
branches/PersistenceReintegration/HeuristicLab.Persistence/4.0/Core/TypeInfo.cs
r15020 r15034 59 59 if (StorableTypeAttribute != null) { 60 60 // check constructors ( 61 if (!type.IsValueType && !type.IsEnum && !type.IsInterface && 61 if (!type.IsValueType && !type.IsEnum && !type.IsInterface && 62 62 GetStorableConstructor() == null && GetDefaultConstructor() == null) 63 63 throw new PersistenceException("No storable constructor or parameterless constructor found."); 64 64 65 66 65 // traverse type hierarchy from base type to sub types 66 Stack<Type> types = new Stack<Type>(); 67 67 while (type != null) { 68 68 types.Push(type); … … 95 95 foreach (var property in propertyInfos) { 96 96 var attrib = StorableAttribute.GetStorableAttribute(property); 97 if ( !attrib.AllowOneWay && (!property.CanRead || !property.CanWrite))97 if ((!property.CanRead || !property.CanWrite) && (attrib == null || !attrib.AllowOneWay)) 98 98 throw new PersistenceException("Properties must be readable and writable or explicity enable one way serialization."); 99 99
Note: See TracChangeset
for help on using the changeset viewer.