Changeset 16481 for branches/2520_PersistenceReintegration
- Timestamp:
- 01/02/19 19:38:48 (6 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
branches/2520_PersistenceReintegration/HeuristicLab.Persistence/3.3/Default/CompositeSerializers/Storable/StorableSerializer.cs
r16462 r16481 70 70 /// </returns> 71 71 public bool CanSerialize(Type type) { 72 if (type.IsEnum || type.IsValueType) return false; // there are other more specific serializers for enums and structs 72 73 var markedStorable = StorableReflection.HasStorableTypeAttribute(type); 73 74 if (GetConstructor(type) == null) 74 if (markedStorable )75 if (markedStorable && !type.IsInterface) 75 76 throw new Exception("[Storable] type has no default constructor and no [StorableConstructor]"); 76 77 else 77 78 return false; 78 79 if (!StorableReflection.IsEmptyOrStorableType(type, true)) 79 if (markedStorable )80 if (markedStorable && !type.IsInterface) 80 81 throw new Exception("[Storable] type has non emtpy, non [Storable] base classes"); 81 82 else
Note: See TracChangeset
for help on using the changeset viewer.