Hi list,
Unfortunately I know too little about the underlying substrates here, to guarantee an intelligible question(!)
Some years back, Iver Kvello developed a RDNZL patch for Generic Types (in the thread titled "Patch for generic types in RDZNL"). However in his offering he notes that Generic Methods are particularly problematic and are not covered by the patch.
I seem to be stopped cold on this very point. There is a redistributable for Microsoft SharePoint (http://www.microsoft.com/download/en/details.aspx?id=21786) that I need to work with and RDNZL came to mind.
There's just two Assemblies. My first exploration took me to the "ClientContext" class, where RDNZL will successfully call 'normal' properties and methods - excepting methods such as "Load<T>".
Iver suggested a workaround, which I'm naively fiddling with at the moment. Any of you experienced RDNZL'ers have sage advice to offer?
Thanks in advance, Brian Connoy
Some years back, Iver Kvello developed a RDNZL patch for Generic Types (in the thread titled “Patch for generic types in RDZNL”). However in his offering he notes that Generic Methods are particularly problematic and are not covered by the patch.
As I recall, the problem is that you cannot use GetMethod in the general case with overloaded methods and so forth - you actually have to iterate over the methods of the function, grabbing the generic types and try to find your (most specific match) the hard way. You get no help from the runtime here. In particuluar, if you want to find "what C# would have called" this is going to be hard.
This is an old reference describing what one must do in the simple case (such as for Load<T>):
http://blogs.microsoft.co.il/blogs/gilf/archive/2008/10/10/invoking-generic-...
This even older describes the issue with GetMethod in the general case:
http://blogs.msdn.com/b/yirutang/archive/2005/09/14/466280.aspx
More of the same:
http://stackoverflow.com/questions/5934432/how-to-getmethod-on-multiple-func...
This last has a 'version' of GetMethod which is supposed to work:
http://stackoverflow.com/questions/4035719/getmethod-for-generic-method
For the simpler cases, you could use reflection directly from RDNZL to find the methods you need and invoke them; it's possible the last reference could be compiled into an assembly and used directly (I haven't tried.)
Unfortunately, I haven't had the opportunity to work with RDNZL for quite some time, so I'm unable to provide further help.
Regards, Iver