How to discover RenderContent parameter names

In the video on setting rendermaterial parameters which I posted in Add layer with new material with Rhinocommon I show how to manually inspect a render material.

The question was asked how to do that programmatically. May I present to you:

This method should work for all RenderContent, meaning also RenderEnvironments and RenderTextures.