Add invocation helpers for (generic) methods (on generic types)
Currently still without documentation, but the first goal would be to have other people look over the API.
And add a proper matcher for GenericTypeMethodsInvoker.GetGenericMethodOfConcreteTypeDefault 😂
Dang, that's more code than I expected. At a glance it doesn't look like any of your classes are public. Not sure if that's the intent?
Anyways, I'll take a more in-depth look a bit later.
Missing docs/examples, which IMO makes having these as shared utilities in NML for mods pretty pointless.... Though I guess NML's API doesn't have proper generated docs to begin with, but IDEs usually can at least show the special C# doc comment XML monstrosities...
As I said in the original post, I wanted to get people's feedback on the capabilities / interface before spending time on documenting it extensively. However if you have any questions as to what it does I'd be happy to explain / go on discord
Though I guess NML's API doesn't have proper generated docs to begin with, but IDEs usually can at least show the special C# doc comment XML monstrosities...
takes off C# developer mask
I was actually a Java guy the WHOLE TIME! I've got no idea how to generate fancy docs from the scary XML comments. Also I hate XML and enjoy markdown.
As I said in the original post, I wanted to get people's feedback on the capabilities / interface before spending time on documenting it extensively. However if you have any questions as to what it does I'd be happy to explain / go on discord
I think the most helpful thing here would be an example or two on what a typical usage of this API would look like. No need to go crazy with the scary XML comments yet... especially because I'm pretty sure like 95% of mod devs don't actually know how to see the XML docs in their IDE. At least that's the vibe I get with some of the questions asked on the Discord.
especially because I'm pretty sure like 95% of mod devs don't actually know how to see the XML docs in their IDE. At least that's the vibe I get with some of the questions asked on the Discord.
...usually just hovering over the methods should show a popup of the details if the comment is formed correctly.
I've got no idea how to generate fancy docs from the scary XML comments.
There's a few choices, though only one out of these that I've used before is doxygen... DocFX looks more modern though from a quick investigation.
I think the most helpful thing here would be an example or two on what a typical usage of this API would look like.
Here's one for the GenericMethodInvoker: https://github.com/Banane9/NeosDynamicVariableLogger/blob/fa0f21ee2cf0c50af83770c47448a54cea2febc9/DynamicVariableLogger/DynamicVariableLogger.cs#L132
I've used it some more in the CustomEntityFramework to help with the invocation of Methods<> on DynamicVariableSpace and while patching DynamicImpulseTriggerWithValue<>, but @KyuubiYoru still need's to set that repo to public.
...usually just hovering over the methods should show a popup of the details if the comment is formed correctly.
that only works in the same project, otherwise you need to enable the Documentation file option under Build > Output in the Properties and have it along side the file.

Generating the pdb information (and embedding it?) may also be a helpful idea (for a dev version anyways).
Here's another example of the GenericMethodInvoker: https://github.com/KyuubiYoru/CustomEntityFramework/blob/a9791a41380ff46b8de2bde5e586f291555d108c/CustomEntityFramework/Functions/DynamicVariableSpaceWrapper.cs#L208-L239
And of the GenericTypeMethodsInvoker: https://github.com/KyuubiYoru/CustomEntityFramework/blob/a9791a41380ff46b8de2bde5e586f291555d108c/CustomEntityFramework/Functions/CustomFunctionLibrary.cs#L130
there you go @ljoonal, I made sure the doc will actually be useful now, too ;)