I need to support a method named 'send-request' as an extension function to be used in an XSLT transformation. This is provided by an extension object on XslCompiledTransform
. The cool thing about extension objects vs. <msxsl:script>
is, well, that I don't have to use <msxsl:script>
, you just declare the namespace and call the function. The bad thing is that the function name must match exactly the CIL method name.
So, I'm wondering, is there a .NET language that supports hyphens in method names ? CLS compliance is not required, the method is invoked using reflection.
Or, can I use some technique that modifies the IL of an assembly to change the method name ?
Or, is there a way to intercept the reflection GetMethod
call and trick the caller that a method 'send-request' exists, but return a 'SendRequest' method instead ?