Skip to content

Conversation

@LukeStampfli
Copy link

Changes NodePortDictionary to keep port order. Dictionary does not guarantee order, with the current implementation when adding dynamic ports and then clearing them and adding them again ports will end up being in a different order.

Changes in this PR:

  • NodePortDictionary no longer inherits from Dictionary
  • NodePortDictionary serializes keys and values lists directly instead of rebuilding them from the dictionary.
  • NodePortDictionary.Values/Keys now accesses the value list which is based on insertion order instead of the dictionary values.
  • Removal now technically runs in O(n), but shouldn't be a performance problem here.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant