Changeset 11431 for branches/OptimizationNetworks/HeuristicLab.Optimization.Networks/3.3/InputPort.cs
- Timestamp:
- 10/09/14 03:10:16 (10 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
branches/OptimizationNetworks/HeuristicLab.Optimization.Networks/3.3/InputPort.cs
r11423 r11431 88 88 if (outputPort != null) { 89 89 outputPort.ValueChanged += OutputPort_ValueChanged; 90 outputPort. ToStringChanged += OutputPort_ToStringChanged;90 outputPort.PathChanged += OutputPort_PathChanged; 91 91 } 92 92 } … … 94 94 if (outputPort != null) { 95 95 outputPort.ValueChanged -= OutputPort_ValueChanged; 96 outputPort. ToStringChanged -= OutputPort_ToStringChanged;96 outputPort.PathChanged -= OutputPort_PathChanged; 97 97 } 98 98 } 99 99 protected void OutputPort_ValueChanged(object sender, EventArgs e) { 100 Value = (T)OutputPort.Value.Clone(); 100 var value = OutputPort.Value; 101 if (value != null) 102 value = (T)value.Clone(); 103 Value = value; 101 104 //DISCUSS: clone value? 102 105 //DISCUSS: switch threads to decouple value propagation and to make communication asynchronous -> should be done in Node? 103 106 } 104 protected void OutputPort_ ToStringChanged(object sender, EventArgs e) {107 protected void OutputPort_PathChanged(object sender, EventArgs e) { 105 108 OnOutputPortChanged(); 106 109 }
Note: See TracChangeset
for help on using the changeset viewer.