Changeset 14713 for branches/PersistenceOverhaul/HeuristicLab.Persistence
- Timestamp:
- 03/03/17 18:41:01 (8 years ago)
- Location:
- branches/PersistenceOverhaul/HeuristicLab.Persistence
- Files:
-
- 3 edited
Legend:
- Unmodified
- Added
- Removed
-
branches/PersistenceOverhaul/HeuristicLab.Persistence/3.3/Default/CompositeSerializers/Storable/StorableSerializer.cs
r14711 r14713 21 21 22 22 using System; 23 using System.CodeDom; 23 24 using System.Collections.Generic; 24 25 using System.Linq; … … 69 70 /// </returns> 70 71 public bool CanSerialize(Type type) { 71 var markedStorable = StorableReflection.HasStorableClassAttribute(type) ;72 var markedStorable = StorableReflection.HasStorableClassAttribute(type) && !type.IsEnum && !type.IsValueType; 72 73 if (GetConstructor(type) == null) 73 74 if (markedStorable) -
branches/PersistenceOverhaul/HeuristicLab.Persistence/4.0/Core/StaticCache.cs
r14711 r14713 113 113 // RegisterType(new Guid("3B3AA69E-1641-4202-AE1D-7EEFF60FA355"), typeof(double[])); 114 114 // RegisterType(new Guid("7DF325A6-2553-4915-B7C6-D98191107CB7"), typeof(string[])); 115 116 RegisterType(new Guid("E451A99B-0CFD-48E6-9BEF-0AE9D1E73628"), typeof(IList)); 115 117 RegisterType(new Guid("DB2A785C-5803-42C7-A01F-E1FD845A83A1"), typeof(List<>)); 116 118 RegisterType(new Guid("EB98A564-BEDC-458A-9E9B-4BF3CDAFB9BE"), typeof(Stack<>)); … … 121 123 RegisterType(new Guid("7E2F3277-7216-4295-A498-9ACA43527D5B"), typeof(HashSet<>)); 122 124 RegisterType(new Guid("E92C35AD-32B1-4F37-B8D2-BE2F5FEB465B"), typeof(Dictionary<,>)); 125 RegisterType(new Guid("18504ADF-2332-4497-8CA0-B2F00CA2EBA2"), typeof(Type)); 123 126 124 127 var allTypes = new Dictionary<string, Type>(5000); … … 162 165 RegisterType(new Guid("00C8C940-63D9-43FF-99BA-9C69301BF043"), allTypes["System.Collections.Generic.RandomizedObjectEqualityComparer"]); 163 166 RegisterType(new Guid("DAF22757-7FCC-49AC-B148-F3DD7E9E0A3B"), allTypes["System.Collections.Generic.IEqualityComparer`1"]); 164 165 167 166 168 //var registeredTypes = type2Guid.Keys.ToArray(); -
branches/PersistenceOverhaul/HeuristicLab.Persistence/4.0/Transformers/StorableClassTransformer.cs
r14711 r14713 30 30 internal sealed class StorableClassBoxTransformer : BoxTransformer<object> { 31 31 public override bool CanTransformType(Type type) { 32 return StorableTypeAttribute.IsStorableType(type) && !type.IsValueType || // don't transform structs32 return StorableTypeAttribute.IsStorableType(type) && !type.IsValueType && !type.IsEnum || // don't transform structs or enums 33 33 type.BaseType != null && CanTransformType(type.BaseType); 34 34 }
Note: See TracChangeset
for help on using the changeset viewer.