Changeset 4068 for trunk/sources/HeuristicLab.Persistence/3.3/Core
- Timestamp:
- 07/22/10 00:44:01 (14 years ago)
- Location:
- trunk/sources/HeuristicLab.Persistence/3.3/Core
- Files:
-
- 14 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/sources/HeuristicLab.Persistence/3.3/Core/Configuration.cs
r3743 r4068 21 21 22 22 using System; 23 using System.Linq;24 23 using System.Collections.Generic; 24 using HeuristicLab.Persistence.Default.CompositeSerializers.Storable; 25 25 using HeuristicLab.Persistence.Interfaces; 26 using HeuristicLab.Persistence.Default.CompositeSerializers.Storable;27 26 28 27 namespace HeuristicLab.Persistence.Core { … … 77 76 "is not compatible with selected format's ({2}) seriali data type ({3})", 78 77 primitiveSerializers.GetType().FullName, primitiveSerializer.SerialDataType.FullName, 79 format.Name, format.SerialDataType.FullName)); 78 format.Name, format.SerialDataType.FullName)); 80 79 this.primitiveSerializers.Add(primitiveSerializer.SourceType, primitiveSerializer); 81 } 80 } 82 81 } 83 82 -
trunk/sources/HeuristicLab.Persistence/3.3/Core/ConfigurationService.cs
r3743 r4068 21 21 22 22 using System; 23 using System.Collections.Generic; 23 24 using System.IO; 24 25 using System.Linq; 25 using System.Collections.Generic;26 26 using System.Reflection; 27 27 using System.Text; … … 29 29 using HeuristicLab.Persistence.Interfaces; 30 30 using HeuristicLab.Tracing; 31 using HeuristicLab.Persistence.Core.Tokens;32 using HeuristicLab.Persistence.Auxiliary;33 31 34 32 namespace HeuristicLab.Persistence.Core { … … 96 94 try { 97 95 TryLoadSettings(); 98 } catch (Exception e) { 96 } 97 catch (Exception e) { 99 98 if (throwOnError) { 100 99 throw new PersistenceException("Could not load persistence settings.", e); … … 163 162 if (a != defaultAssembly) 164 163 DiscoverFrom(a); 165 } catch (AppDomainUnloadedException x) { 164 } 165 catch (AppDomainUnloadedException x) { 166 166 Logger.Warn("could not get list of assemblies, AppDomain has already been unloaded", x); 167 167 } … … 207 207 } 208 208 } 209 } catch (ReflectionTypeLoadException e) { 209 } 210 catch (ReflectionTypeLoadException e) { 210 211 Logger.Warn("could not analyse assembly: " + a.FullName, e); 211 212 } -
trunk/sources/HeuristicLab.Persistence/3.3/Core/DataMemberAccessor.cs
r3913 r4068 22 22 using System; 23 23 using System.Reflection; 24 using HeuristicLab.Persistence.Core;25 24 using System.Reflection.Emit; 26 using System.Collections.Generic;27 25 28 26 namespace HeuristicLab.Persistence.Core { 29 27 30 28 /// <summary> 31 29 /// Encapsulation and abstraction for access a data member of an object -
trunk/sources/HeuristicLab.Persistence/3.3/Core/DeSerializer.cs
r3743 r4068 20 20 #endregion 21 21 22 using System; 22 23 using System.Collections.Generic; 23 using System; 24 using HeuristicLab.Persistence.Auxiliary; 25 using HeuristicLab.Persistence.Core.Tokens; 24 26 using HeuristicLab.Persistence.Interfaces; 25 using HeuristicLab.Persistence.Core.Tokens;26 using HeuristicLab.Persistence.Auxiliary;27 using HeuristicLab.Tracing;28 using System.Reflection;29 27 30 28 namespace HeuristicLab.Persistence.Core { … … 82 80 } 83 81 } 84 82 85 83 private readonly Dictionary<int, object> id2obj; 86 84 private readonly Dictionary<Type, object> serializerMapping; … … 124 122 serializer = Activator.CreateInstance(serializerType, true); 125 123 serializerMapping.Add(type, serializer); 126 } catch (PersistenceException) { 124 } 125 catch (PersistenceException) { 127 126 throw; 128 } catch (Exception e) { 127 } 128 catch (Exception e) { 129 129 throw new PersistenceException(string.Format( 130 130 "Could not add type info for {0} ({1})", … … 181 181 try { 182 182 parentStack.Push(new Midwife(type, (ICompositeSerializer)serializerMapping[type], token.Id)); 183 } catch (Exception e) { 183 } 184 catch (Exception e) { 184 185 if (e is InvalidCastException || e is KeyNotFoundException) { 185 186 throw new PersistenceException(String.Format( … … 210 211 id2obj[(int)token.Id] = value; 211 212 SetValue(token.Name, value); 212 } catch (Exception e) { 213 } 214 catch (Exception e) { 213 215 if (e is InvalidCastException || e is KeyNotFoundException) { 214 216 throw new PersistenceException(String.Format( -
trunk/sources/HeuristicLab.Persistence/3.3/Core/GeneratorBase.cs
r3743 r4068 20 20 #endregion 21 21 22 using System.Collections.Generic;23 22 using System; 24 using System.Text;23 using HeuristicLab.Persistence.Core.Tokens; 25 24 using HeuristicLab.Persistence.Interfaces; 26 using HeuristicLab.Persistence.Core;27 using System.IO;28 using ICSharpCode.SharpZipLib.Zip;29 using HeuristicLab.Tracing;30 using HeuristicLab.Persistence.Core.Tokens;31 25 32 26 namespace HeuristicLab.Persistence.Core { -
trunk/sources/HeuristicLab.Persistence/3.3/Core/PersistenceException.cs
r3743 r4068 20 20 #endregion 21 21 22 using System; 22 23 using System.Collections.Generic; 23 using System;24 using HeuristicLab.Persistence.Interfaces;25 using HeuristicLab.Persistence.Core.Tokens;26 using HeuristicLab.Persistence.Default.CompositeSerializers.Storable;27 24 using System.Text; 28 25 … … 32 29 /// Exception thrown by components inside the persistence framework. 33 30 /// </summary> 34 [Serializable] 31 [Serializable] 35 32 public class PersistenceException : Exception { 36 33 … … 87 84 } 88 85 } 89 86 90 87 } -
trunk/sources/HeuristicLab.Persistence/3.3/Core/Serializer.cs
r3913 r4068 20 20 #endregion 21 21 22 using System; 23 using System.Collections; 22 24 using System.Collections.Generic; 23 using System.Collections; 24 using System; 25 using System.Linq; 25 using System.Reflection; 26 using System.Text; 26 27 using HeuristicLab.Persistence.Auxiliary; 28 using HeuristicLab.Persistence.Core.Tokens; 27 29 using HeuristicLab.Persistence.Interfaces; 28 using HeuristicLab.Persistence.Core.Tokens;29 using HeuristicLab.Persistence.Default.CompositeSerializers.Storable;30 using System.Text;31 using System.Reflection;32 using System.IO;33 using System.Diagnostics;34 30 35 31 namespace HeuristicLab.Persistence.Core { … … 94 90 } 95 91 } 96 92 97 93 /// <summary> 98 94 /// Contains a list of files (mostly assemblies) that are … … 207 203 208 204 private IEnumerator<ISerializationToken> Serialize(DataMemberAccessor accessor, object obj) { 209 205 210 206 object value = accessor.Get(obj); 211 207 if (value == null) … … 244 240 compositeSerializer.CreateMetaInfo(value), 245 241 emitTypeInfo); 246 throw CreatePersistenceException(type, "Could not determine how to serialize a value."); 247 } catch (Exception x) { 242 throw CreatePersistenceException(type, "Could not determine how to serialize a value."); 243 } 244 catch (Exception x) { 248 245 if (isTestRun) { 249 246 exceptions.Add(x); … … 254 251 throw CreatePersistenceException(type, "Uncaught exception during serialization: " + x.Message); 255 252 } 256 } finally { 253 } 254 finally { 257 255 objectGraphTrace.Pop(); 258 256 } -
trunk/sources/HeuristicLab.Persistence/3.3/Core/Tag.cs
r3743 r4068 20 20 #endregion 21 21 22 using System.Collections.Generic;23 22 24 23 namespace HeuristicLab.Persistence.Core { -
trunk/sources/HeuristicLab.Persistence/3.3/Core/Tokens/BeginToken.cs
r3743 r4068 20 20 #endregion 21 21 22 using HeuristicLab.Persistence.Interfaces;23 22 24 23 namespace HeuristicLab.Persistence.Core.Tokens { -
trunk/sources/HeuristicLab.Persistence/3.3/Core/Tokens/EndToken.cs
r3743 r4068 20 20 #endregion 21 21 22 using HeuristicLab.Persistence.Interfaces;23 22 24 23 namespace HeuristicLab.Persistence.Core.Tokens { -
trunk/sources/HeuristicLab.Persistence/3.3/Core/Tokens/NulLReferenceToken.cs
r3743 r4068 20 20 #endregion 21 21 22 using HeuristicLab.Persistence.Interfaces;23 22 24 23 namespace HeuristicLab.Persistence.Core.Tokens { -
trunk/sources/HeuristicLab.Persistence/3.3/Core/Tokens/ReferenceToken.cs
r3743 r4068 20 20 #endregion 21 21 22 using HeuristicLab.Persistence.Interfaces;23 22 24 23 namespace HeuristicLab.Persistence.Core.Tokens { -
trunk/sources/HeuristicLab.Persistence/3.3/Core/Tokens/SerializationTokenBase.cs
r3743 r4068 20 20 #endregion 21 21 22 using HeuristicLab.Persistence.Interfaces;23 22 using System.Reflection; 24 23 using System.Text; 24 using HeuristicLab.Persistence.Interfaces; 25 25 26 26 namespace HeuristicLab.Persistence.Core.Tokens { -
trunk/sources/HeuristicLab.Persistence/3.3/Core/Tokens/TypeToken.cs
r3743 r4068 20 20 #endregion 21 21 22 using System;23 using System.Collections.Generic;24 using System.Linq;25 using System.Text;26 22 using HeuristicLab.Persistence.Interfaces; 27 23
Note: See TracChangeset
for help on using the changeset viewer.