Know the connected parameters


Is there a way to find input parameters connected to an output parameter of a Grasshopper component.
For input parameters, the IGH_Param have SourceCount and Sources but I can’t find the equivalent for output parameters.


In this video, I change the order of two inputs and two outputs.
And to update the connected input sources I just:

if (oldParam.SourceCount > 0) {
    foreach (var src in oldParam.Sources)
        newParam.AddSource (src);

I would like to reconnect the outputs.
Any idea is welcome.


Oh yes !
I had seen that but I did not understand its use and I had not even tried …
Thank you !

The thing is that changing the recipients does nothing, you have to change the sources of the recipient

if (oldP.Recipients.Count > 0) {
    for (var i = 0; i < oldP.Recipients.Count; i++)
        oldP.Recipients[i].AddSource (newP);