Description
The constructor of DotNode
takes an optional string identifier parameter. If none is provided, the identifier is set to null
. However, if you do not set an identifiert, the compiled dot file is invalid, as the nodes can not be identified.
I see multiple solutions and was wondering what you think would be the preferred one:
- Make the identifier required
- If the identifier is not set a unique identifier, e.g. a GUID or using a counter
Since the identifier is not visible in the rendered graph from a dot file and since picking a unique name for each node can be a bit annoying, I'd suggest to leave it optional and just generate GUID if not set.
While we're on the topic of uniqueness, currently there are no checks to ensure that the graph has unique identifiers. So if you add two nodes with the same identifier, only one will be rendered. Any ideas on how to solve this?