GoGeneralNodePort Ports list?

How to find the number of nodes on GoGeneralNode? Is there any list already defined to access ports of the GoGeneralNode (i.e. ports on the right or left)? How to access ports of the GoGeneral Node?

How to iterate just the Left ports:

      int num = this.LeftPortsCount;
      float portandlabelheight = 0; // total height
      for (int i = 0; i < num; i++) {
        GoGeneralNodePort p = GetLeftPort(i);
        if (p != null && p.Visible)
          portandlabelheight += p.PortAndLabelHeight;

The FunctionBlock sample has more.

There’s also all the Node.SourceLinks etc built into the base IGoNode Interface.

Thank you very much Jake…
I was looking into Ports Enum which contains all the ports of the node.
I think, the solution you have suggested is much better than using Ports Enum.