- Timestamp:
- 12/28/18 16:10:48 (6 years ago)
- Location:
- branches/2520_PersistenceReintegration/HeuristicLab.Persistence/3.3
- Files:
-
- 1 added
- 6 deleted
- 44 edited
Legend:
- Unmodified
- Added
- Removed
-
branches/2520_PersistenceReintegration/HeuristicLab.Persistence/3.3/Auxiliary/TypeLoader.cs
r16453 r16462 23 23 using System.Collections.Generic; 24 24 using System.Reflection; 25 using H euristicLab.Persistence.Core;25 using HEAL.Fossil; 26 26 using HeuristicLab.Tracing; 27 27 -
branches/2520_PersistenceReintegration/HeuristicLab.Persistence/3.3/Auxiliary/TypeName.cs
r16453 r16462 24 24 using System.Linq; 25 25 using System.Text; 26 using H euristicLab.Persistence.Default.CompositeSerializers.Storable;26 using HEAL.Fossil; 27 27 28 28 namespace HeuristicLab.Persistence.Auxiliary { … … 104 104 105 105 [StorableConstructor] 106 protected TypeName( bool deserializing) { }106 protected TypeName(StorableConstructorFlag _) { } 107 107 /// <summary> 108 108 /// Initializes a new instance of the <see cref="TypeName"/> class. -
branches/2520_PersistenceReintegration/HeuristicLab.Persistence/3.3/Core/Configuration.cs
r16453 r16462 22 22 using System; 23 23 using System.Collections.Generic; 24 using H euristicLab.Persistence.Default.CompositeSerializers.Storable;24 using HEAL.Fossil; 25 25 using HeuristicLab.Persistence.Interfaces; 26 26 … … 50 50 51 51 [StorableConstructor] 52 protected Configuration( bool isDeserializing) {52 protected Configuration(StorableConstructorFlag _) { 53 53 compositeSerializerCache = new Dictionary<Type, ICompositeSerializer>(); 54 if (isDeserializing) 55 return; 54 } 55 56 public Configuration() { 57 compositeSerializerCache = new Dictionary<Type, ICompositeSerializer>(); 56 58 primitiveSerializers = new Dictionary<Type, IPrimitiveSerializer>(); 57 59 compositeSerializers = new List<ICompositeSerializer>(); 58 60 } 61 59 62 60 63 /// <summary> … … 67 70 IEnumerable<IPrimitiveSerializer> primitiveSerializers, 68 71 IEnumerable<ICompositeSerializer> compositeSerializers) 69 : this( false) {72 : this() { 70 73 this.Format = format; 71 74 this.compositeSerializers.AddRange(compositeSerializers); … … 131 134 /// <returns>A new <see cref="Configuration"/></returns> 132 135 public Configuration Copy() { 133 var config = new Configuration( false);136 var config = new Configuration(); 134 137 config.Format = Format; 135 138 foreach (var ps in primitiveSerializers) -
branches/2520_PersistenceReintegration/HeuristicLab.Persistence/3.3/Core/ConfigurationService.cs
r16453 r16462 26 26 using System.Reflection; 27 27 using System.Text; 28 using HEAL.Fossil; 28 29 using HeuristicLab.Persistence.Default.Xml; 29 30 using HeuristicLab.Persistence.Interfaces; -
branches/2520_PersistenceReintegration/HeuristicLab.Persistence/3.3/Core/DataMemberAccessor.cs
r16453 r16462 23 23 using System.Reflection; 24 24 using System.Reflection.Emit; 25 using HEAL.Fossil; 25 26 26 27 namespace HeuristicLab.Persistence.Core { -
branches/2520_PersistenceReintegration/HeuristicLab.Persistence/3.3/Core/Deserializer.cs
r16453 r16462 22 22 using System; 23 23 using System.Collections.Generic; 24 using HEAL.Fossil; 24 25 using HeuristicLab.Persistence.Auxiliary; 25 26 using HeuristicLab.Persistence.Core.Tokens; -
branches/2520_PersistenceReintegration/HeuristicLab.Persistence/3.3/Core/FormatBase.cs
r16453 r16462 21 21 22 22 using System; 23 using H euristicLab.Persistence.Default.CompositeSerializers.Storable;23 using HEAL.Fossil; 24 24 25 25 namespace HeuristicLab.Persistence.Interfaces { … … 44 44 45 45 [StorableConstructor] 46 protected FormatBase( bool deserializing) { }46 protected FormatBase(StorableConstructorFlag _) { } 47 47 protected FormatBase() { } 48 48 -
branches/2520_PersistenceReintegration/HeuristicLab.Persistence/3.3/Core/PrimitiveSerializerBase.cs
r16453 r16462 22 22 using System; 23 23 using System.Text; 24 using H euristicLab.Persistence.Default.CompositeSerializers.Storable;24 using HEAL.Fossil; 25 25 26 26 namespace HeuristicLab.Persistence.Interfaces { -
branches/2520_PersistenceReintegration/HeuristicLab.Persistence/3.3/Core/Serializer.cs
r16453 r16462 25 25 using System.Reflection; 26 26 using System.Text; 27 using HEAL.Fossil; 27 28 using HeuristicLab.Persistence.Auxiliary; 28 29 using HeuristicLab.Persistence.Core.Tokens; -
branches/2520_PersistenceReintegration/HeuristicLab.Persistence/3.3/Default/CompositeSerializers/ArraySerializer.cs
r16453 r16462 23 23 using System.Collections.Generic; 24 24 using HeuristicLab.Persistence.Core; 25 using H euristicLab.Persistence.Default.CompositeSerializers.Storable;25 using HEAL.Fossil; 26 26 using HeuristicLab.Persistence.Interfaces; 27 27 … … 32 32 33 33 [StorableConstructor] 34 private ArraySerializer( bool deserializing) { }34 private ArraySerializer(StorableConstructorFlag _) { } 35 35 public ArraySerializer() { } 36 36 -
branches/2520_PersistenceReintegration/HeuristicLab.Persistence/3.3/Default/CompositeSerializers/CompactNumberArray2StringSerializer.cs
r16453 r16462 26 26 using HeuristicLab.Persistence.Auxiliary; 27 27 using HeuristicLab.Persistence.Core; 28 using H euristicLab.Persistence.Default.CompositeSerializers.Storable;28 using HEAL.Fossil; 29 29 using HeuristicLab.Persistence.Interfaces; 30 30 … … 82 82 83 83 [StorableConstructor] 84 private CompactNumberArray2StringSerializer( bool deserializing) { }84 private CompactNumberArray2StringSerializer(StorableConstructorFlag _) { } 85 85 public CompactNumberArray2StringSerializer() { } 86 86 -
branches/2520_PersistenceReintegration/HeuristicLab.Persistence/3.3/Default/CompositeSerializers/ConcreteDictionarySerializer.cs
r16453 r16462 25 25 using System.Linq; 26 26 using HeuristicLab.Persistence.Core; 27 using H euristicLab.Persistence.Default.CompositeSerializers.Storable;27 using HEAL.Fossil; 28 28 using HeuristicLab.Persistence.Interfaces; 29 29 … … 34 34 35 35 [StorableConstructor] 36 private ConcreteDictionarySerializer( bool deserializing) { }36 private ConcreteDictionarySerializer(StorableConstructorFlag _) { } 37 37 public ConcreteDictionarySerializer() { } 38 38 -
branches/2520_PersistenceReintegration/HeuristicLab.Persistence/3.3/Default/CompositeSerializers/DictionarySerializer.cs
r16453 r16462 25 25 using HeuristicLab.Persistence.Auxiliary; 26 26 using HeuristicLab.Persistence.Core; 27 using H euristicLab.Persistence.Default.CompositeSerializers.Storable;27 using HEAL.Fossil; 28 28 using HeuristicLab.Persistence.Interfaces; 29 29 … … 34 34 35 35 [StorableConstructor] 36 private DictionarySerializer( bool deserializing) { }36 private DictionarySerializer(StorableConstructorFlag _) { } 37 37 public DictionarySerializer() { } 38 38 -
branches/2520_PersistenceReintegration/HeuristicLab.Persistence/3.3/Default/CompositeSerializers/EnumSerializer.cs
r16453 r16462 23 23 using System.Collections.Generic; 24 24 using HeuristicLab.Persistence.Core; 25 using H euristicLab.Persistence.Default.CompositeSerializers.Storable;25 using HEAL.Fossil; 26 26 using HeuristicLab.Persistence.Interfaces; 27 27 … … 32 32 33 33 [StorableConstructor] 34 private EnumSerializer( bool deserializing) { }34 private EnumSerializer(StorableConstructorFlag _) { } 35 35 public EnumSerializer() { } 36 36 -
branches/2520_PersistenceReintegration/HeuristicLab.Persistence/3.3/Default/CompositeSerializers/EnumerableSerializer.cs
r16453 r16462 26 26 using HeuristicLab.Persistence.Auxiliary; 27 27 using HeuristicLab.Persistence.Core; 28 using H euristicLab.Persistence.Default.CompositeSerializers.Storable;28 using HEAL.Fossil; 29 29 using HeuristicLab.Persistence.Interfaces; 30 30 … … 35 35 36 36 [StorableConstructor] 37 private EnumerableSerializer( bool deserializing) { }37 private EnumerableSerializer(StorableConstructorFlag _) { } 38 38 public EnumerableSerializer() { } 39 39 -
branches/2520_PersistenceReintegration/HeuristicLab.Persistence/3.3/Default/CompositeSerializers/HashSetSerializer.cs
r16453 r16462 26 26 using System.Reflection; 27 27 using HeuristicLab.Persistence.Core; 28 using H euristicLab.Persistence.Default.CompositeSerializers.Storable;28 using HEAL.Fossil; 29 29 using HeuristicLab.Persistence.Interfaces; 30 30 … … 35 35 36 36 [StorableConstructor] 37 private HashSetSerializer( bool deserializing) { }37 private HashSetSerializer(StorableConstructorFlag _) { } 38 38 public HashSetSerializer() { } 39 39 -
branches/2520_PersistenceReintegration/HeuristicLab.Persistence/3.3/Default/CompositeSerializers/KeyValuePairSerializer.cs
r16453 r16462 25 25 using System.Reflection; 26 26 using HeuristicLab.Persistence.Core; 27 using H euristicLab.Persistence.Default.CompositeSerializers.Storable;27 using HEAL.Fossil; 28 28 using HeuristicLab.Persistence.Interfaces; 29 29 … … 34 34 35 35 [StorableConstructor] 36 private KeyValuePairSerializer( bool deserializing) { }36 private KeyValuePairSerializer(StorableConstructorFlag _) { } 37 37 public KeyValuePairSerializer() { } 38 38 -
branches/2520_PersistenceReintegration/HeuristicLab.Persistence/3.3/Default/CompositeSerializers/Number2StringSerializer.cs
r16453 r16462 25 25 using HeuristicLab.Persistence.Auxiliary; 26 26 using HeuristicLab.Persistence.Core; 27 using H euristicLab.Persistence.Default.CompositeSerializers.Storable;27 using HEAL.Fossil; 28 28 using HeuristicLab.Persistence.Default.Xml; 29 29 using HeuristicLab.Persistence.Default.Xml.Primitive; … … 44 44 45 45 [StorableConstructor] 46 private Number2StringSerializer( bool deserializing) { }46 private Number2StringSerializer(StorableConstructorFlag _) { } 47 47 public Number2StringSerializer() { } 48 48 -
branches/2520_PersistenceReintegration/HeuristicLab.Persistence/3.3/Default/CompositeSerializers/NumberEnumerable2StringSerializer.cs
r16453 r16462 26 26 using HeuristicLab.Persistence.Auxiliary; 27 27 using HeuristicLab.Persistence.Core; 28 using H euristicLab.Persistence.Default.CompositeSerializers.Storable;28 using HEAL.Fossil; 29 29 using HeuristicLab.Persistence.Interfaces; 30 30 … … 35 35 36 36 [StorableConstructor] 37 private NumberEnumerable2StringSerializer( bool deserializing) { }37 private NumberEnumerable2StringSerializer(StorableConstructorFlag _) { } 38 38 public NumberEnumerable2StringSerializer() { } 39 39 -
branches/2520_PersistenceReintegration/HeuristicLab.Persistence/3.3/Default/CompositeSerializers/QueueSerializer.cs
r16453 r16462 25 25 using System.Reflection; 26 26 using HeuristicLab.Persistence.Core; 27 using H euristicLab.Persistence.Default.CompositeSerializers.Storable;27 using HEAL.Fossil; 28 28 using HeuristicLab.Persistence.Interfaces; 29 29 … … 34 34 35 35 [StorableConstructor] 36 private QueueSerializer( bool deserializing) { }36 private QueueSerializer(StorableConstructorFlag _) { } 37 37 public QueueSerializer() { } 38 38 -
branches/2520_PersistenceReintegration/HeuristicLab.Persistence/3.3/Default/CompositeSerializers/StackSerializer.cs
r16453 r16462 25 25 using System.Reflection; 26 26 using HeuristicLab.Persistence.Core; 27 using H euristicLab.Persistence.Default.CompositeSerializers.Storable;27 using HEAL.Fossil; 28 28 using HeuristicLab.Persistence.Interfaces; 29 29 … … 34 34 35 35 [StorableConstructor] 36 private StackSerializer( bool deserializing) { }36 private StackSerializer(StorableConstructorFlag _) { } 37 37 public StackSerializer() { } 38 38 -
branches/2520_PersistenceReintegration/HeuristicLab.Persistence/3.3/Default/CompositeSerializers/Storable/StorableMemberInfo.cs
r16453 r16462 23 23 using System.Reflection; 24 24 using System.Text; 25 using H euristicLab.Persistence.Core;25 using HEAL.Fossil; 26 26 27 27 namespace HeuristicLab.Persistence.Default.CompositeSerializers.Storable { -
branches/2520_PersistenceReintegration/HeuristicLab.Persistence/3.3/Default/CompositeSerializers/Storable/StorableReflection.cs
r16453 r16462 24 24 using System.Linq; 25 25 using System.Reflection; 26 using H euristicLab.Persistence.Core;26 using HEAL.Fossil; 27 27 28 28 namespace HeuristicLab.Persistence.Default.CompositeSerializers.Storable { … … 43 43 storableMembers.AddRange(GenerateStorableMembers(type.BaseType)); 44 44 45 var storable ClassAttribute = GetStorableClassAttribute(type);46 if (storable ClassAttribute != null) {47 switch (storable ClassAttribute.Type) {48 case Storable ClassType.MarkedOnly:45 var storableTypeAttribute = GetStorableTypeAttribute(type); 46 if (storableTypeAttribute != null) { 47 switch (storableTypeAttribute.MemberSelection) { 48 case StorableMemberSelection.MarkedOnly: 49 49 AddMarkedMembers(type, storableMembers); break; 50 case Storable ClassType.AllFields:50 case StorableMemberSelection.AllFields: 51 51 AddAll(type, MemberTypes.Field, storableMembers); break; 52 case Storable ClassType.AllProperties:52 case StorableMemberSelection.AllProperties: 53 53 AddAll(type, MemberTypes.Property, storableMembers); break; 54 case Storable ClassType.AllFieldsAndAllProperties:54 case StorableMemberSelection.AllFieldsAndAllProperties: 55 55 AddAll(type, MemberTypes.Field | MemberTypes.Property, storableMembers); break; 56 56 default: 57 throw new PersistenceException("unsupported [Storable ClassType]: " + storableClassAttribute.Type);57 throw new PersistenceException("unsupported [StorableMemberSelection]: " + storableTypeAttribute.MemberSelection); 58 58 } 59 59 } … … 62 62 63 63 public static bool IsEmptyOrStorableType(Type type, bool recursive) { 64 if (!HasStorable ClassAttribute(type) && !IsEmptyType(type, false)) return false;64 if (!HasStorableTypeAttribute(type) && !IsEmptyType(type, false)) return false; 65 65 return !recursive || type.BaseType == null || IsEmptyOrStorableType(type.BaseType, true); 66 66 } … … 72 72 foreach (var hook in CollectHooks(hookType, type.BaseType)) 73 73 yield return hook; 74 if (HasStorable ClassAttribute(type)) {74 if (HasStorableTypeAttribute(type)) { 75 75 foreach (MethodInfo methodInfo in type.GetMethods(DECLARED_INSTANCE_MEMBERS)) { 76 76 if (methodInfo.ReturnType == typeof(void) && methodInfo.GetParameters().Length == 0) { … … 174 174 #region [StorableClass] helpers 175 175 176 private static Storable ClassAttribute GetStorableClassAttribute(Type type) {177 lock (storable ClassCache) {178 if (storable ClassCache.ContainsKey(type))179 return storable ClassCache[type];180 Storable ClassAttribute attribute = type181 .GetCustomAttributes(typeof(Storable ClassAttribute), false)182 .SingleOrDefault() as Storable ClassAttribute;183 storable ClassCache.Add(type, attribute);176 private static StorableTypeAttribute GetStorableTypeAttribute(Type type) { 177 lock (storableTypeCache) { 178 if (storableTypeCache.ContainsKey(type)) 179 return storableTypeCache[type]; 180 StorableTypeAttribute attribute = type 181 .GetCustomAttributes(typeof(StorableTypeAttribute), false) 182 .SingleOrDefault() as StorableTypeAttribute; 183 storableTypeCache.Add(type, attribute); 184 184 return attribute; 185 185 } 186 186 } 187 187 188 public static bool HasStorable ClassAttribute(Type type) {189 return GetStorable ClassAttribute(type) != null;190 } 191 192 private static Dictionary<Type, Storable ClassAttribute> storableClassCache =193 new Dictionary<Type, Storable ClassAttribute>();188 public static bool HasStorableTypeAttribute(Type type) { 189 return GetStorableTypeAttribute(type) != null; 190 } 191 192 private static Dictionary<Type, StorableTypeAttribute> storableTypeCache = 193 new Dictionary<Type, StorableTypeAttribute>(); 194 194 195 195 #endregion -
branches/2520_PersistenceReintegration/HeuristicLab.Persistence/3.3/Default/CompositeSerializers/Storable/StorableSerializer.cs
r16453 r16462 26 26 using System.Reflection.Emit; 27 27 using System.Text; 28 using HEAL.Fossil; 28 29 using HeuristicLab.Persistence.Core; 29 30 using HeuristicLab.Persistence.Interfaces; … … 49 50 50 51 [StorableConstructor] 51 private StorableSerializer( bool deserializing) : this() { }52 private StorableSerializer(StorableConstructorFlag _) { } 52 53 53 54 #region ICompositeSerializer implementation … … 69 70 /// </returns> 70 71 public bool CanSerialize(Type type) { 71 var markedStorable = StorableReflection.HasStorable ClassAttribute(type);72 var markedStorable = StorableReflection.HasStorableTypeAttribute(type); 72 73 if (GetConstructor(type) == null) 73 74 if (markedStorable) … … 240 241 .Where(ci => ci.GetCustomAttributes(typeof(StorableConstructorAttribute), false).Length > 0)) { 241 242 if (ci.GetParameters().Length != 1 || 242 ci.GetParameters()[0].ParameterType != typeof( bool))243 throw new PersistenceException("StorableConstructor must have exactly one argument of type bool");243 ci.GetParameters()[0].ParameterType != typeof(StorableConstructorFlag)) 244 throw new PersistenceException("StorableConstructor must have exactly one argument of type StorableConstructorFlag"); 244 245 var dm = new DynamicMethod("", typeof(object), null, type, true); 245 246 var ilgen = dm.GetILGenerator(); 246 ilgen.Emit(OpCodes.Ldc_I4_1); // load true 247 var defaultFlagFieldInfo = typeof(StorableConstructorFlag).GetField("Default", BindingFlags.Static | BindingFlags.Public); 248 ilgen.Emit(OpCodes.Ldsfld, defaultFlagFieldInfo); // load the object 247 249 ilgen.Emit(OpCodes.Newobj, ci); 248 250 ilgen.Emit(OpCodes.Ret); -
branches/2520_PersistenceReintegration/HeuristicLab.Persistence/3.3/Default/CompositeSerializers/StructSerializer.cs
r16453 r16462 24 24 using System.Reflection; 25 25 using HeuristicLab.Persistence.Core; 26 using H euristicLab.Persistence.Default.CompositeSerializers.Storable;26 using HEAL.Fossil; 27 27 using HeuristicLab.Persistence.Interfaces; 28 28 … … 33 33 34 34 [StorableConstructor] 35 private StructSerializer( bool deserializing) { }35 private StructSerializer(StorableConstructorFlag _) { } 36 36 public StructSerializer() { } 37 37 -
branches/2520_PersistenceReintegration/HeuristicLab.Persistence/3.3/Default/CompositeSerializers/TupleSerializer.cs
r16453 r16462 25 25 using System.Reflection; 26 26 using HeuristicLab.Persistence.Core; 27 using H euristicLab.Persistence.Default.CompositeSerializers.Storable;27 using HEAL.Fossil; 28 28 using HeuristicLab.Persistence.Interfaces; 29 29 … … 34 34 35 35 [StorableConstructor] 36 private TupleSerializer( bool deserializing) { }36 private TupleSerializer(StorableConstructorFlag _) { } 37 37 public TupleSerializer() { } 38 38 -
branches/2520_PersistenceReintegration/HeuristicLab.Persistence/3.3/Default/CompositeSerializers/TypeSerializer.cs
r16453 r16462 24 24 using HeuristicLab.Persistence.Auxiliary; 25 25 using HeuristicLab.Persistence.Core; 26 using H euristicLab.Persistence.Default.CompositeSerializers.Storable;26 using HEAL.Fossil; 27 27 using HeuristicLab.Persistence.Interfaces; 28 28 … … 33 33 34 34 [StorableConstructor] 35 private TypeSerializer( bool deserializing) { }35 private TypeSerializer(StorableConstructorFlag _) { } 36 36 public TypeSerializer() { } 37 37 -
branches/2520_PersistenceReintegration/HeuristicLab.Persistence/3.3/Default/DebugString/DebugString.cs
r16453 r16462 20 20 #endregion 21 21 22 using H euristicLab.Persistence.Default.CompositeSerializers.Storable;22 using HEAL.Fossil; 23 23 using HeuristicLab.Persistence.Interfaces; 24 24 … … 39 39 40 40 [StorableConstructor] 41 protected DebugString( bool deserializing) { }41 protected DebugString(StorableConstructorFlag _) { } 42 42 private DebugString() { } 43 43 -
branches/2520_PersistenceReintegration/HeuristicLab.Persistence/3.3/Default/DebugString/DebugStringFormat.cs
r16453 r16462 20 20 #endregion 21 21 22 using H euristicLab.Persistence.Default.CompositeSerializers.Storable;22 using HEAL.Fossil; 23 23 using HeuristicLab.Persistence.Interfaces; 24 24 … … 37 37 38 38 [StorableConstructor] 39 protected DebugStringFormat( bool deserializing) : base(deserializing) { }39 protected DebugStringFormat(StorableConstructorFlag _) : base(_) { } 40 40 public DebugStringFormat() { } 41 41 } -
branches/2520_PersistenceReintegration/HeuristicLab.Persistence/3.3/Default/Xml/Compact/DoubleList2XmlSerializer.cs
r16453 r16462 23 23 using System.Collections.Generic; 24 24 using System.Text; 25 using HEAL.Fossil; 25 26 using HeuristicLab.Persistence.Auxiliary; 26 using HeuristicLab.Persistence.Core;27 27 using HeuristicLab.Persistence.Default.Xml.Primitive; 28 28 -
branches/2520_PersistenceReintegration/HeuristicLab.Persistence/3.3/Default/Xml/Compact/NumberArray2XmlSerializerBase.cs
r16453 r16462 21 21 22 22 using System; 23 using System.Collections;24 23 using System.Collections.Generic; 25 24 using System.Linq; 26 25 using System.Text; 26 using HEAL.Fossil; 27 27 using HeuristicLab.Persistence.Auxiliary; 28 using HeuristicLab.Persistence.Core;29 using HeuristicLab.Persistence.Default.CompositeSerializers.Storable;30 28 31 29 namespace HeuristicLab.Persistence.Default.Xml.Compact { -
branches/2520_PersistenceReintegration/HeuristicLab.Persistence/3.3/Default/Xml/Compact/NumberEnumeration2XmlSerializerBase.cs
r16453 r16462 23 23 using System.Collections; 24 24 using System.Text; 25 using HEAL.Fossil; 25 26 using HeuristicLab.Persistence.Auxiliary; 26 using HeuristicLab.Persistence.Core;27 using HeuristicLab.Persistence.Default.CompositeSerializers.Storable;28 27 29 28 namespace HeuristicLab.Persistence.Default.Xml.Compact { -
branches/2520_PersistenceReintegration/HeuristicLab.Persistence/3.3/Default/Xml/EasyXmlGenerator.cs
r16453 r16462 23 23 using System.Collections.Generic; 24 24 using System.IO; 25 using HEAL.Fossil; 25 26 using HeuristicLab.Persistence.Auxiliary; 26 27 using HeuristicLab.Persistence.Core; … … 181 182 try { 182 183 using (StreamWriter writer = new StreamWriter(stream)) { 183 Serializer serializer = newSerializer(obj, config);184 Core.Serializer serializer = new Core.Serializer(obj, config); 184 185 serializer.InterleaveTypeInformation = true; 185 186 ReadableXmlGenerator generator = new ReadableXmlGenerator(); -
branches/2520_PersistenceReintegration/HeuristicLab.Persistence/3.3/Default/Xml/Primitive/Char2XmlFormatter.cs
r16453 r16462 23 23 using System.Text; 24 24 using System.Text.RegularExpressions; 25 using H euristicLab.Persistence.Core;25 using HEAL.Fossil; 26 26 using HeuristicLab.Persistence.Interfaces; 27 27 -
branches/2520_PersistenceReintegration/HeuristicLab.Persistence/3.3/Default/Xml/Primitive/DateTime2XmlSerializer.cs
r16453 r16462 21 21 22 22 using System; 23 using H euristicLab.Persistence.Core;23 using HEAL.Fossil; 24 24 25 25 namespace HeuristicLab.Persistence.Default.Xml.Primitive { -
branches/2520_PersistenceReintegration/HeuristicLab.Persistence/3.3/Default/Xml/Primitive/Guid2XmlSerializer.cs
r16453 r16462 22 22 using System; 23 23 using System.Globalization; 24 using H euristicLab.Persistence.Core;24 using HEAL.Fossil; 25 25 26 26 -
branches/2520_PersistenceReintegration/HeuristicLab.Persistence/3.3/Default/Xml/Primitive/SimpleNumber2XmlSerializerBase.cs
r16453 r16462 22 22 using System; 23 23 using System.Reflection; 24 using H euristicLab.Persistence.Core;24 using HEAL.Fossil; 25 25 26 26 namespace HeuristicLab.Persistence.Default.Xml.Primitive { -
branches/2520_PersistenceReintegration/HeuristicLab.Persistence/3.3/Default/Xml/Primitive/String2XmlSerializer.cs
r16453 r16462 23 23 using System.Text; 24 24 using System.Text.RegularExpressions; 25 using H euristicLab.Persistence.Core;25 using HEAL.Fossil; 26 26 27 27 namespace HeuristicLab.Persistence.Default.Xml.Primitive { -
branches/2520_PersistenceReintegration/HeuristicLab.Persistence/3.3/Default/Xml/Primitive/TimeSpan2XmlSerializer.cs
r16453 r16462 21 21 22 22 using System; 23 using H euristicLab.Persistence.Core;23 using HEAL.Fossil; 24 24 25 25 -
branches/2520_PersistenceReintegration/HeuristicLab.Persistence/3.3/Default/Xml/XmlFormat.cs
r16453 r16462 20 20 #endregion 21 21 22 using H euristicLab.Persistence.Default.CompositeSerializers.Storable;22 using HEAL.Fossil; 23 23 using HeuristicLab.Persistence.Interfaces; 24 24 … … 38 38 39 39 [StorableConstructor] 40 protected XmlFormat( bool deserializing) : base(deserializing) { }40 protected XmlFormat(StorableConstructorFlag _) : base(_) { } 41 41 public XmlFormat() { } 42 42 } -
branches/2520_PersistenceReintegration/HeuristicLab.Persistence/3.3/Default/Xml/XmlGenerator.cs
r16453 r16462 27 27 using System.Text; 28 28 using System.Threading; 29 using HEAL.Fossil; 29 30 using HeuristicLab.Persistence.Core; 30 31 using HeuristicLab.Persistence.Core.Tokens; … … 312 313 313 314 private static void Serialize(object obj, Stream stream, Configuration config, bool includeAssemblies, CompressionLevel compression, CancellationToken cancellationToken = default(CancellationToken)) { 314 Serializer serializer = newSerializer(obj, config);315 Core.Serializer serializer = new Core.Serializer(obj, config); 315 316 Serialize(stream, includeAssemblies, compression, serializer, cancellationToken); 316 317 } 317 318 318 private static void Serialize(Stream stream, bool includeAssemblies, CompressionLevel compression, Serializer serializer, CancellationToken cancellationToken = default(CancellationToken)) {319 private static void Serialize(Stream stream, bool includeAssemblies, CompressionLevel compression, Core.Serializer serializer, CancellationToken cancellationToken = default(CancellationToken)) { 319 320 try { 320 321 cancellationToken.ThrowIfCancellationRequested(); … … 429 430 public static void Serialize(object obj, Stream stream, Configuration config, bool includeAssemblies, CompressionType compressionType = CompressionType.GZip, CancellationToken cancellationToken = default(CancellationToken)) { 430 431 try { 431 Serializer serializer = newSerializer(obj, config);432 Core.Serializer serializer = new Core.Serializer(obj, config); 432 433 if (compressionType == CompressionType.Zip) { 433 434 Serialize(obj, stream, config, includeAssemblies, CompressionLevel.Optimal, cancellationToken); … … 454 455 CompressionType compressionType = CompressionType.GZip, CancellationToken cancellationToken = default(CancellationToken)) { 455 456 try { 456 Serializer serializer = newSerializer(obj, config);457 Core.Serializer serializer = new Core.Serializer(obj, config); 457 458 if (compressionType == CompressionType.Zip) { 458 459 Serialize(stream, includeAssemblies, CompressionLevel.Optimal, serializer, cancellationToken); … … 468 469 } 469 470 470 private static void Serialize(Stream stream, Serializer serializer, CancellationToken cancellationToken = default(CancellationToken)) {471 private static void Serialize(Stream stream, Core.Serializer serializer, CancellationToken cancellationToken = default(CancellationToken)) { 471 472 cancellationToken.ThrowIfCancellationRequested(); 472 473 using (StreamWriter writer = new StreamWriter(new GZipStream(stream, CompressionMode.Compress))) { -
branches/2520_PersistenceReintegration/HeuristicLab.Persistence/3.3/Default/Xml/XmlParser.cs
r16453 r16462 26 26 using System.IO.Compression; 27 27 using System.Xml; 28 using HEAL.Fossil; 28 29 using HeuristicLab.Persistence.Core; 29 30 using HeuristicLab.Persistence.Core.Tokens; -
branches/2520_PersistenceReintegration/HeuristicLab.Persistence/3.3/Default/Xml/XmlString.cs
r16453 r16462 21 21 22 22 using System.Text; 23 using H euristicLab.Persistence.Default.CompositeSerializers.Storable;23 using HEAL.Fossil; 24 24 using HeuristicLab.Persistence.Interfaces; 25 25 … … 41 41 42 42 [StorableConstructor] 43 protected XmlString( bool deserializing) { }43 protected XmlString(StorableConstructorFlag _) { } 44 44 private XmlString() { } 45 45 -
branches/2520_PersistenceReintegration/HeuristicLab.Persistence/3.3/HeuristicLab.Persistence-3.3.csproj
r16452 r16462 108 108 </PropertyGroup> 109 109 <Import Project="$(MSBuildToolsPath)\Microsoft.CSharp.targets" /> 110 <!-- To modify your build process, add your task inside one of the targets below and uncomment it. 111 Other similar extension points exist, see Microsoft.Common.targets. 112 <Target Name="BeforeBuild"> 110 <Import Project="$(SolutionDir)\.nuget\NuGet.targets" Condition="Exists('$(SolutionDir)\.nuget\NuGet.targets')" /> 111 <Target Name="EnsureNuGetPackageBuildImports" BeforeTargets="PrepareForBuild"> 112 <PropertyGroup> 113 <ErrorText>This project references NuGet package(s) that are missing on this computer. Enable NuGet Package Restore to download them. For more information, see http://go.microsoft.com/fwlink/?LinkID=322105. The missing file is {0}.</ErrorText> 114 </PropertyGroup> 115 <Error Condition="!Exists('$(SolutionDir)\.nuget\NuGet.targets')" Text="$([System.String]::Format('$(ErrorText)', '$(SolutionDir)\.nuget\NuGet.targets'))" /> 113 116 </Target> 114 <Target Name="AfterBuild"> 115 </Target> 116 --> 117 <ItemGroup> 117 <ItemGroup> 118 <Reference Include="Google.Protobuf, Version=3.6.1.0, Culture=neutral, PublicKeyToken=a7d26565bac4d604, processorArchitecture=MSIL"> 119 <HintPath>..\..\packages\Google.Protobuf.3.6.1\lib\net45\Google.Protobuf.dll</HintPath> 120 </Reference> 121 <Reference Include="HEAL.Fossil, Version=1.0.0.0, Culture=neutral, PublicKeyToken=ba48961d6f65dcec, processorArchitecture=MSIL"> 122 <HintPath>..\..\packages\HEAL.Fossil.1.0.0\lib\netstandard2.0\HEAL.Fossil.dll</HintPath> 123 </Reference> 118 124 <Reference Include="System" /> 119 125 <Reference Include="System.configuration" /> … … 132 138 <Compile Include="Auxiliary\TypeNameParser.cs" /> 133 139 <Compile Include="Auxiliary\ReflectionTools.cs" /> 140 <None Include="packages.config" /> 134 141 <None Include="Plugin.cs.frame" /> 135 142 <Compile Include="Core\Configuration.cs" /> 136 <Compile Include="Core\PersistenceException.cs" />137 143 <Compile Include="Core\PrimitiveSerializerBase.cs" /> 138 144 <Compile Include="Core\FormatBase.cs" /> … … 157 163 <Compile Include="Default\CompositeSerializers\Storable\StorableReflection.cs" /> 158 164 <Compile Include="Default\CompositeSerializers\Storable\StorableMemberInfo.cs" /> 159 <Compile Include="Default\CompositeSerializers\Storable\StorableClassType.cs" />160 165 <Compile Include="Core\DataMemberAccessor.cs" /> 161 <Compile Include="Default\CompositeSerializers\Storable\StorableClassAttribute.cs" />162 <Compile Include="Default\CompositeSerializers\Storable\StorableAttribute.cs" />163 <Compile Include="Default\CompositeSerializers\Storable\StorableConstructorAttribute.cs" />164 <Compile Include="Default\CompositeSerializers\Storable\StorableHookAttribute.cs" />165 166 <Compile Include="Default\CompositeSerializers\Storable\StorableSerializer.cs" /> 166 167 <Compile Include="Default\CompositeSerializers\StructSerializer.cs" />
Note: See TracChangeset
for help on using the changeset viewer.