Preview geometry of custom class output - C#

Developing a plugin for Gh.
I have a custom class that I output from one component to be used as an input for another component. The class represents a simple geometry (brep) with additional info. I would like to preview the geometry to the user.

When I output the class object through pManager.AddGenericParameter(), I get the proper output, but no geometric representation.

So, my question is…
How can I preview geometry of my choosing, even though the geometry is not connected to an output?

You’ll need to implement the IGH_PreviewData interface in your goo type.

You can get custom previews either by letting the data draw itself (in which case it pretty much has to be stored inside a Generic or Geometry parameter) or by putting it inside a custom parameter type which is able to understand the data it contains.

See: Preview in Grasshopper