I am currently trying to write extensions to Dynamic Linq. For that I need to add a method signature to the IEnumerableSignatures
interface located in the internal class ExpressionParser
.
internal class ExpressionParser
{
interface IEnumerableSignatures
{
[...]
}
}
While I could add the signature to the code directly, I'd rather define this as an extension method to the interface, to keep the original code clean. Usually, to add the method DefaultIfEmpty
, I would do something like this:
internal static class Extension
{
static void DefaultIfEmpty(this ExpressionParser.IEnumerableSignatures sig);
}
This gives an access error though, because ExpressionParser
is internal. I have already tried with several combinations of access level for the class and method.
Is there a way to add an extension method to such an interface or do I have to mess with the original code?
[edit] Turns out that, even when making the interface itself internal (or public for that matter), it is not recognized by dynamic linq. I still got some not-found exception on runtime. So there's no (obvious) way around editing the codeplex code. [/edit]