Changeset 16943 for branches/2994-AutoDiffForIntervals/HeuristicLab.Core
- Timestamp:
- 05/11/19 08:14:56 (5 years ago)
- Location:
- branches/2994-AutoDiffForIntervals
- Files:
-
- 4 edited
Legend:
- Unmodified
- Added
- Removed
-
branches/2994-AutoDiffForIntervals
- Property svn:mergeinfo changed
/trunk merged: 16933,16939-16940,16942
- Property svn:mergeinfo changed
-
branches/2994-AutoDiffForIntervals/HeuristicLab.Core
- Property svn:mergeinfo changed
/trunk/HeuristicLab.Core merged: 16933,16942
- Property svn:mergeinfo changed
-
branches/2994-AutoDiffForIntervals/HeuristicLab.Core/3.3/NamedItem.cs
r16565 r16943 30 30 [Storable] 31 31 protected string name; 32 /// <inheritdoc/>32 /// Gets and sets the name of the item. 33 33 /// <remarks>Calls <see cref="OnNameChanging"/> and also <see cref="OnNameChanged"/> 34 34 /// eventually in the setter.</remarks> … … 74 74 } 75 75 /// <summary> 76 /// Initializes a new instance of <see cref=" Variable"/> with name <c>Anonymous</c>76 /// Initializes a new instance of <see cref="NamedItem"/> with name and description <c>string.Empty</c> 77 77 /// and value <c>null</c>. 78 78 /// </summary> … … 82 82 } 83 83 /// <summary> 84 /// Initializes a new instance of <see cref="Variable"/> with the specified <paramref name="name"/> 85 /// and the specified <paramref name="value"/>. 84 /// Initializes a new instance of <see cref="NamedItem"/> with the specified <paramref name="name"/> 86 85 /// </summary> 87 86 /// <param name="name">The name of the current instance.</param> 88 /// <param name="value">The value of the current instance.</param>89 87 protected NamedItem(string name) { 90 88 if (name == null) this.name = string.Empty; … … 92 90 description = string.Empty; 93 91 } 92 /// <summary> 93 /// Initializes a new instance of <see cref="NamedItem"/> with the specified <paramref name="name"/> and <paramref name="description"/>. 94 /// </summary> 94 95 protected NamedItem(string name, string description) { 95 96 if (name == null) this.name = string.Empty; … … 100 101 101 102 /// <summary> 102 /// Gets the string representation of the current instance in the format: <c>Name: [null|Value]</c>.103 /// Gets the string representation of the current instance. 103 104 /// </summary> 104 105 /// <returns>The current instance as a string.</returns> … … 122 123 /// Fires a new <c>NameChanged</c> event. 123 124 /// </summary> 124 /// <remarks>Calls <see cref="Item Base.OnChanged"/>.</remarks>125 /// <remarks>Calls <see cref="Item.OnToStringChanged"/>.</remarks> 125 126 protected virtual void OnNameChanged() { 126 127 var handler = NameChanged; … … 133 134 /// Fires a new <c>DescriptionChanged</c> event. 134 135 /// </summary> 135 /// <remarks>Calls <see cref="ItemBase.OnChanged"/>.</remarks>136 136 protected virtual void OnDescriptionChanged() { 137 137 var handler = DescriptionChanged; -
branches/2994-AutoDiffForIntervals/HeuristicLab.Core/3.3/PersistenceContentManager.cs
r16911 r16943 24 24 using HeuristicLab.Persistence.Default.Xml; 25 25 using HEAL.Attic; 26 using System; 26 27 27 28 namespace HeuristicLab.Core { … … 32 33 // first try to load using the new persistence format 33 34 var ser = new ProtoBufSerializer(); 34 var o = (IStorableContent)ser.Deserialize(filename, out SerializationInfo info); 35 if (info.SerializedTypes != null) { 36 return o; 35 try { 36 return (IStorableContent)ser.Deserialize(filename, out SerializationInfo info); 37 } catch (Exception e) { 38 try { 39 // try old format if new format fails 40 return XmlParser.Deserialize<IStorableContent>(filename); 41 } catch (Exception e2) { 42 throw new AggregateException($"Cannot open file {filename}", e, e2); 43 } 37 44 } 38 // try old format if new format fails39 return XmlParser.Deserialize<IStorableContent>(filename);40 45 } 41 46
Note: See TracChangeset
for help on using the changeset viewer.