Changeset 4722 for trunk/sources/HeuristicLab.Operators.Views.GraphVisualization/3.3/General/ConnectionInfo.cs
- Timestamp:
- 11/06/10 01:56:04 (14 years ago)
- Location:
- trunk/sources
- Files:
-
- 2 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/sources
- Property svn:mergeinfo changed
/branches/CloningRefactoring (added) merged: 4656-4693,4696-4697,4711-4714,4718-4719
- Property svn:mergeinfo changed
-
trunk/sources/HeuristicLab.Operators.Views.GraphVisualization/3.3/General/ConnectionInfo.cs
r4068 r4722 28 28 [StorableClass] 29 29 public class ConnectionInfo : DeepCloneable, IConnectionInfo { 30 private ConnectionInfo() { 30 [StorableConstructor] 31 protected ConnectionInfo(bool deserializing) : base() { } 32 protected ConnectionInfo(ConnectionInfo original, Cloner cloner) 33 : base(original, cloner) { 34 from = cloner.Clone(original.from); 35 connectorFrom = original.ConnectorFrom; 36 to = cloner.Clone(original.To); 37 connectorTo = original.ConnectorTo; 38 } 39 public override IDeepCloneable Clone(Cloner cloner) { 40 return new ConnectionInfo(this, cloner); 31 41 } 32 42 public ConnectionInfo(IShapeInfo from, string connectorFrom, IShapeInfo to, string connectorTo) 33 : this() {43 : base() { 34 44 if (from == to) 35 45 throw new ArgumentException("Could not create connections between the same shape info."); … … 70 80 protected virtual void OnChanged() { 71 81 EventHandler handler = this.Changed; 72 if (handler != null) 73 this.Changed(this, EventArgs.Empty); 74 } 75 76 public override IDeepCloneable Clone(Cloner cloner) { 77 ConnectionInfo clone = (ConnectionInfo)base.Clone(cloner); 78 clone.from = (IShapeInfo)cloner.Clone(this.from); 79 clone.connectorFrom = this.ConnectorFrom; 80 clone.to = (IShapeInfo)cloner.Clone(this.To); 81 clone.connectorTo = this.ConnectorTo; 82 return clone; 82 if (handler != null) this.Changed(this, EventArgs.Empty); 83 83 } 84 84 }
Note: See TracChangeset
for help on using the changeset viewer.