- Timestamp:
- 02/06/12 17:50:17 (13 years ago)
- Location:
- branches/HeuristicLab.TimeSeries
- Files:
-
- 3 edited
Legend:
- Unmodified
- Added
- Removed
-
branches/HeuristicLab.TimeSeries
- Property svn:ignore
-
old new 3 3 *.resharper 4 4 *.suo 5 *.user 5 6 *.vsp 6 7 Doxygen 8 FxCopResults.txt 7 9 Google.ProtocolBuffers-0.9.1.dll 8 10 HeuristicLab 3.3.5.1.ReSharper.user
-
- Property svn:mergeinfo changed
- Property svn:ignore
-
branches/HeuristicLab.TimeSeries/HeuristicLab.Problems.ExternalEvaluation/3.3/ExternalEvaluationProblem.cs
r7268 r7460 127 127 [StorableConstructor] 128 128 private ExternalEvaluationProblem(bool deserializing) : base(deserializing) { } 129 [StorableHook(HookType.AfterDeserialization)]130 private void AfterDeserializationHook() {131 AttachEventHandlers();132 }133 134 129 private ExternalEvaluationProblem(ExternalEvaluationProblem original, Cloner cloner) 135 130 : base(original, cloner) { 136 AttachEventHandlers();131 RegisterEventHandlers(); 137 132 } 138 133 public override IDeepCloneable Clone(Cloner cloner) { … … 154 149 155 150 InitializeOperators(); 156 AttachEventHandlers();151 RegisterEventHandlers(); 157 152 } 158 153 [StorableHook(HookType.AfterDeserialization)] … … 170 165 } 171 166 #endregion 167 RegisterEventHandlers(); 172 168 } 173 169 … … 220 216 221 217 #region Helper 222 private void AttachEventHandlers() {218 private void RegisterEventHandlers() { 223 219 SolutionCreatorParameter.ValueChanged += new EventHandler(SolutionCreatorParameter_ValueChanged); 224 220 EvaluatorParameter.ValueChanged += new EventHandler(EvaluatorParameter_ValueChanged); -
branches/HeuristicLab.TimeSeries/HeuristicLab.Problems.ExternalEvaluation/3.3/SolutionMessageBuilder.cs
r7268 r7460 52 52 [StorableHook(HookType.AfterDeserialization)] 53 53 private void AfterDeserialization() { 54 AttachEventHandlers(); 54 // BackwardsCompatibility3.3 55 #region Backwards compatible code, remove with 3.4 56 #pragma warning disable 0612 57 if (converters != null) { 58 if (convertersList == null) convertersList = new CheckedItemList<IItemToSolutionMessageConverter>(); 59 foreach (IItemToSolutionMessageConverter c in converters) 60 convertersList.Add(c); 61 converters.Clear(); 62 converters = null; 63 } 64 #pragma warning restore 0612 65 #endregion 66 RegisterEventHandlers(); 55 67 } 56 68 … … 58 70 : base(original, cloner) { 59 71 convertersList = cloner.Clone(original.convertersList); 60 AttachEventHandlers();72 RegisterEventHandlers(); 61 73 } 62 74 public override IDeepCloneable Clone(Cloner cloner) { … … 75 87 convertersList.Add(new TimeSpanValueConverter()); 76 88 77 AttachEventHandlers();89 RegisterEventHandlers(); 78 90 } 79 91 … … 93 105 } 94 106 95 private void AttachEventHandlers() { 96 // BackwardsCompatibility3.3 97 #region Backwards compatible code, remove with 3.4 98 #pragma warning disable 0612 99 if (converters != null) { 100 if (convertersList == null) convertersList = new CheckedItemList<IItemToSolutionMessageConverter>(); 101 foreach (IItemToSolutionMessageConverter c in converters) 102 convertersList.Add(c); 103 converters.Clear(); 104 converters = null; 105 } 106 #pragma warning restore 0612 107 #endregion 107 private void RegisterEventHandlers() { 108 108 convertersList.ItemsAdded += new CollectionItemsChangedEventHandler<IndexedItem<IItemToSolutionMessageConverter>>(convertersList_Changed); 109 109 convertersList.ItemsRemoved += new CollectionItemsChangedEventHandler<IndexedItem<IItemToSolutionMessageConverter>>(convertersList_Changed);
Note: See TracChangeset
for help on using the changeset viewer.