Changeset 6210 for branches/PersistenceSpeedUp/HeuristicLab.Persistence
- Timestamp:
- 05/17/11 10:55:02 (14 years ago)
- Location:
- branches/PersistenceSpeedUp/HeuristicLab.Persistence/3.3
- Files:
-
- 5 edited
Legend:
- Unmodified
- Added
- Removed
-
branches/PersistenceSpeedUp/HeuristicLab.Persistence/3.3/Auxiliary/TypeLoader.cs
r5445 r6210 27 27 namespace HeuristicLab.Persistence.Auxiliary { 28 28 29 internal class TypeLoader {29 internal static class TypeLoader { 30 30 31 31 public static Type Load(string typeNameString) { … … 33 33 try { 34 34 type = Type.GetType(typeNameString, true); 35 } 36 catch (Exception) { 35 } catch (Exception) { 37 36 Logger.Warn(String.Format( 38 37 "Cannot load type \"{0}\", falling back to partial name", typeNameString)); … … 44 43 #pragma warning restore 0618 45 44 type = a.GetType(typeName.ToString(false, false), true); 46 } 47 catch (Exception) { 45 } catch (Exception) { 48 46 throw new PersistenceException(String.Format( 49 47 "Could not load type \"{0}\"", … … 63 61 typeNameString, 64 62 type.AssemblyQualifiedName)); 65 } 66 catch (PersistenceException) { 63 } catch (PersistenceException) { 67 64 throw; 68 } 69 catch (Exception e) { 65 } catch (Exception e) { 70 66 Logger.Warn(String.Format( 71 67 "Could not perform version check requested type was {0} while loaded type is {1}:", -
branches/PersistenceSpeedUp/HeuristicLab.Persistence/3.3/Auxiliary/TypeName.cs
r5445 r6210 84 84 /// <value>The assembly attribues.</value> 85 85 [Storable] 86 public Dictionary<string, string> AssemblyAttribu es { get; internal set; }86 public Dictionary<string, string> AssemblyAttributes { get; internal set; } 87 87 88 88 /// <summary> … … 108 108 GenericArgs = new List<TypeName>(); 109 109 MemoryMagic = ""; 110 AssemblyAttribu es = new Dictionary<string, string>();110 AssemblyAttributes = new Dictionary<string, string>(); 111 111 } 112 112 … … 155 155 sb.Append(", ").Append(AssemblyName); 156 156 if (full) 157 foreach (var property in AssemblyAttribu es)157 foreach (var property in AssemblyAttributes) 158 158 sb.Append(", ").Append(property.Key).Append('=').Append(property.Value); 159 159 } … … 224 224 throw new Exception("Cannot compare versions of different types"); 225 225 if (CompareVersions( 226 this.AssemblyAttribu es["Version"],227 typeName.AssemblyAttribu es["Version"]) > 0)226 this.AssemblyAttributes["Version"], 227 typeName.AssemblyAttributes["Version"]) > 0) 228 228 return true; 229 229 IEnumerator<TypeName> thisIt = this.GenericArgs.GetEnumerator(); … … 255 255 this.AssemblyName != typeName.AssemblyName) 256 256 throw new Exception("Cannot compare versions of different types"); 257 Version thisVersion = new Version(this.AssemblyAttribu es["Version"]);258 Version tVersion = new Version(typeName.AssemblyAttribu es["Version"]);257 Version thisVersion = new Version(this.AssemblyAttributes["Version"]); 258 Version tVersion = new Version(typeName.AssemblyAttributes["Version"]); 259 259 if (this.AssemblyName == "mscorlib" && 260 260 (thisVersion.Major == 2 || thisVersion.Major == 4) && -
branches/PersistenceSpeedUp/HeuristicLab.Persistence/3.3/Auxiliary/TypeNameParser.cs
r5445 r6210 246 246 KeyValuePair<string, string> property = 247 247 TransformAssemblyProperty(); 248 typeName.AssemblyAttribu es.Add(property.Key, property.Value);248 typeName.AssemblyAttributes.Add(property.Key, property.Value); 249 249 } 250 250 } -
branches/PersistenceSpeedUp/HeuristicLab.Persistence/3.3/Default/CompositeSerializers/HashSetSerializer.cs
r5445 r6210 73 73 } 74 74 } 75 76 public object HashSet { get; set; }77 75 } 78 76 } -
branches/PersistenceSpeedUp/HeuristicLab.Persistence/3.3/Tests/UseCases.cs
r5698 r6210 863 863 Assert.Fail("Exception expected"); 864 864 } catch (PersistenceException pe) { 865 Assert.AreEqual( pe.InnerException.Message, "this constructor will always fail");865 Assert.AreEqual("this constructor will always fail", pe.InnerException.Message); 866 866 } 867 867 }
Note: See TracChangeset
for help on using the changeset viewer.