What's the equivalent in C#?
I've found this but it's a bit cryptic and doesn't provide any example.
The idea isn't to list all via Reflection but automate the process. (Granted that reflection may or may not be part of the solution in the end.)
The goal is to wrap all and every single calls (or access if we are to mimic Python's __getattribute__
) so, eg, I can introduce an extra-check before resuming or aborting.
I did do some experiment back then but lost them and stumbled back onto that not-so-helpful post so here I am.
My goal was, in Unity, when there is no way to enforce a method being called (eg some Init
) to wrap all accesses and check if we aren't calling/accessing anything before it has been properly initialized.