Northwoods.Go Assembly > Northwoods.Go Namespace > GoToolLinking Class : IsValidLink Method |
fromPort.IsValidLink(toPort)
If both fromPort and toPort are null, this returns false. If only one of the parameters is null, then this returns the value of fromPort.CanLinkFrom()
or toPort.CanLinkTo()
, on the non-null port parameter. This predicate also disallows interactive linking of a link to a port that is part of the link--e.g. linking to a port that is a label on a GoLabeledLink. The results of these calls are stored in the ValidPortsCache hash table. The ports are associated with Valid or Invalid values depending on whether this predicate returned true or false. Note that to check for links from a port to itself, this predicate may be called with the same value for both arguments.
GoPort has more options for link validity checking; see IsValidLink for more details. If you override this method, you may well need to do so for both GoToolLinkingNew and GoToolRelinking, and then replace both of the standard linking tools in your GoView by calling GoView.ReplaceMouseTool.
Target Platforms: Windows 7, Windows Vista SP1 or later, Windows XP SP3, Windows Server 2008 (Server Core not supported), Windows Server 2008 R2 (Server Core supported with SP1 or later), Windows Server 2003 SP2