Complex Data Type and complex Parameter linked to RhinoDoc

There is some simple nice example on the documentation about a custom Grasshopper Data-Type c# (Tristate-Example…)

and a corresponding custom Parameter c#

Main Question

Are there any examples arround, for a more complex Data-Type and corresponding Parameter ? especially some Data-Types linked to the Rhino-Doc and its geometry ?

for example some implementation of IGH_GeometricGoo / or derive from GH_GeometricGoo
as Data Type and a corresponding

my project will depend on Rhino-Objects that fulfils certain criteria. For assigning the Rhino-Objects to the Grasshopper Parameter its easy, to write some SetCustomGeometryFilter
within the Prompt_Singular or Prompt_Plural Method of the Parameter.

But how do i handle Changes of the RhinoObject ? for example when the user transforms it, or moves CV s ? How do i invoke, that my Geometryfilter checks, if the Data is still valid ?.
How do i participate in the RhinoDoc.AddRhinoObject Event and the RhinoDoc.ModifyObjectAttributes Event - for sure Grasshopper has already subscribed and i can hock onto this Grasshopper mechanism instead of subscribing my own event handling.

In an old topic, it turns out that my Parameter or the GH_GeometricGoo should override RegisterRemoteIDs(GH_GuidTable)
But how do i handle changes ? if the user calls for example Prompt_Singularof my object a second time - how do i Unregister the old Guid ?

thanks for any hints / startingpoints / examples

kind regards -tom

Override the RegisterRemoteIDs() method on your parameter or component, and you will automatically be expired if a Rhino object associated with your data changes.

Thanks @DavidRutten for your fast answer.

sorry if the flow of events is still not clear for me:
By RegisterRemoteIds() my parameter tells Grasshopper to watch a certain RhinoObject for it and expire it - clear.

But how is the flow of events / functions in case of the registered Guid / RhinoObject got changed ?

(1) If the RhinoObject got changed - wich function of my parameter is called next ?
let s say my parameters want to check, if the Changed RhinoObject still fits some criteria.

(2) and another case - if the user assigns another Rhino-Doc-Object to my parameter (a second time)? or the collection changes - i don t see any way to ‘UnRegisterRemoteIDs()’ or “Reset” the Guids that are linked to with the parameters Object.

thanks for your clarification. kind regards, good night -tom