FindNodeByKey equivalent for links

Hi,

I’m using a GraphLinksModel. When i look for a node in the model, i can get my node using the myModel.FindNodeByKey method.
I would like to do the same for links, but i can’t find a FindLinkByKey method or an equivalent.
Is there a method on the model object to do that ?

Secondly, i can’t find the key property on link. My link class inherits from GraphLinksModelLinkData.

Here is my class prototype for links :

Public Class LinkGoXam
    Inherits GraphLinksModelLinkData(Of [String], [String])

Do i need to inherit from another class to get the Key attribute on links ?

Links are not assumed to have a key by which they can be identified.

Perhaps you could find a particular link data object by looking at all of the link data connected to a node data. The GetFromLinksForNode, GetToLinksForNode, or GetLinksBetweenNodes methods might be what you’re looking for.

But if you are searching for a particular link data without any knowledge about what it’s connected to, then you’ll need to implement your own index of all of your link data. Perhaps if you want to implement that functionality as part of your custom model, you could override the OnChanged method and look for the ModelChange.AddedLink and RemovedLink cases so that you can update a Dictionary that is acting as your index for all of your link data.