Implement a generic method invoker, which makes generic method invocation more type-safe, and does not wrap exceptions in TargetInvocationException.