Closed jake1164 closed 1 year ago
I can gladly provide a pull request and update samples. I am also flexible on the Event name 'NodesLinked'.
I can gladly provide a pull request and update samples. I am also flexible on the Event name 'NodesLinked'.
We used to have this with the LinkAttached event, but it was removed on 2.0.0 (not sure why, maybe performance reasons).
Looks like the alternative in 2.0.0 as per #75 is TargetPortChanged, which does not provide the same functionality and pushes a lot of logic into the client.
Part of #214
Based on #121 I understand the best way to get notified when two nodes have been linked is to use the SourcePortChanged and TargetPortChanged.
However, It would be a lot cleaner to just subscribe to an event in BaseLinkModel.cs:
Then in the SetTargetPort & SetSourcePort just fire the event with the source and target ports.