Changeset 11452 for branches/OptimizationNetworks/HeuristicLab.Optimization.Networks/3.3/InputPort.cs
- Timestamp:
- 10/12/14 03:02:37 (10 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
branches/OptimizationNetworks/HeuristicLab.Optimization.Networks/3.3/InputPort.cs
r11438 r11452 44 44 RegisterOutputPortEvents(); 45 45 OnOutputPortChanged(); 46 UpdateValue(); 46 47 } 47 48 } … … 79 80 } 80 81 82 protected virtual void UpdateValue() { 83 if (OutputPort != null) { 84 var value = OutputPort.Value; 85 if (value != null) 86 value = (T)value.Clone(); 87 Value = value; 88 //DISCUSS: clone value? 89 //DISCUSS: switch threads to decouple value propagation and to make communication asynchronous -> should be done in Node? 90 } 91 } 92 81 93 public event EventHandler OutputPortChanged; 82 94 protected void OnOutputPortChanged() { … … 96 108 } 97 109 protected void OutputPort_ValueChanged(object sender, EventArgs e) { 98 var value = OutputPort.Value; 99 if (value != null) 100 value = (T)value.Clone(); 101 Value = value; 102 //DISCUSS: clone value? 103 //DISCUSS: switch threads to decouple value propagation and to make communication asynchronous -> should be done in Node? 110 UpdateValue(); 104 111 } 105 112 }
Note: See TracChangeset
for help on using the changeset viewer.