GrasshopperReloadAssemblies

@DavidRutten

Hi. Is there any public event or overrideable method that is called GrasshopperReloadAssemblies is executed?

Hi @LongNguyen,
I guess you are mentioning wrong David.
Have you checked SetLoadMechanism?

Thanks. Indeed I tagged the wrong David, just corrected it now

SetLoadMechanism is not what I am after.

Here is my problem: If my gha subscribes a handler to an Rhino or Grasshopper event, then if I run GrasshopperReloadAssemblies, the handler from the previous gha run will still be active. But now I don’t have access to it anymore to get rid of it.

This same pattern also occurs when I write code in the C# Script component, if I subscribe a handler to a Rhino/Grasshopper event and do not implement some sort of automatic unsubscription, then when the C# Script component recompile the ScriptInstance, the same handler code will be subscribed AGAIN to the same event (because the .NET runtime considers them as two different handlers as they come from different ScriptInstance objects).