IsValidLink - Embedded within Nodes

First, let me say that I am extremely new to GoDiagram tools, and I am finding the learning curve a bit daunting but I am struggling through.
I want the logic about whether or not a link can be made between two nodes to be embedded in the Node that is acting as the From Node. Is there anyway to embed this logic in the node? I have figured out how to call IsValidLink from the View.OnDragover, and View.DoExternalDrop and in the GoToolLinkingNew custom object. I do not like having all of the decentralized points though that all basically determine the same thing, and that is to determine if I can link this node to another node.
Somebody smart please advise.
Thanks in advance

It’s highly unlikely that you need to implement a Control.DragOver event handler (or override GoView.OnDragOver).

If you are just talking about drawing links between nodes in the same GoView, you don’t need to implement any Control event handlers or override any GoView methods. And the GoView.DoExternalDrop method is only called for a drag-and-drop originating in a different Control, so that isn’t involved with “linking” behavior either.

There are basically two places where you can put code to determine whether the user can draw a link between two ports: either in the linking tool (GoToolLinkingNew and/or GoToolRelinking) or in the port. In either case you’ll want to override the IsValidLink method. By default the GoToolLinking.IsValidLink method will call the GoPort.IsValidLink method in addition to various checks.

As a convenience there are some properties that you can set in order to affect the behavior of these two IsValidLink methods. For many common cases you just need to set these properties instead of overriding any methods. Take a look at the GoPort properties that have “Valid” in their names. Also take a look at the GoDocument.ValidCycle property.

But in the most general case, you’ll need to override one of those two IsValidLink methods. If you really want the code “in” your node, you can override GoPort.IsValidLink and make sure your node uses an instance of your port subclass instead of the usual one.

Thanks for the feedback.

I am trying to subclass the GoPort as you suggested, but the code I am placing within that port is not firing.
Below are a couple of code snippets to helpy you understand.
My node inherits from GoBasicNode, and in my Node Constructor I have this:
Port = New CallAllocationRACPort
Port.FromSpot = MiddleRight
Port.ToSpot = MiddleLeft
Furthermore, in the CallAllocationRACPort I have overridden two methods:
Public Overrides Function IsValidLink(ByVal toPort As Northwoods.Go.IGoPort) As Boolean
If TypeOf toPort.GoObject.TopLevelObject Is CallAllocationRACNode Then
MyBase.IsValidLink(toPort)
End If
Return False
End Function
Public Overrides Function CanLinkTo() As Boolean
Dim I As Integer = 1
If I = 1 Then
Return MyBase.CanLinkTo()
End If
End Function
I want to put real logic in the IsValidLink method, but I cannot get a breakpoint to actually hit whenever I try to drag a new link from one node to the next (yes, i have tried TO and FROM a CallAllocationRACNode)
Why would the breakpoints not be getting hit?
I have disabled all other Link Validation code that I had sprinkled through the app.
Thanks,
David

Have you replaced any standard Tools or done anything to Mouse Events?