public static object Call(MethodInfo genericMethodDefinition, Type[] genericArguments, params object[] args) { //TODO could use emit for more speed var genericMethod = GenericMethodMaker.Get(genericMethodDefinition, genericArguments); return(genericMethod.Invoke(null, args)); }
public static object Call(MethodInfo genericMethodDefinition, Type genericTypeDefinition, params object[] args) { ArgumentChecker.Not(!genericTypeDefinition.IsGenericTypeDefinition, "genericTypeDefinition"); ArgumentChecker.NotEmpty(args, "args"); var genericType = args[0].GetType(); var genericArguments = GenericArgs.Get(genericTypeDefinition, genericType); return(Call(genericMethodDefinition, genericArguments, args)); }
public static MethodInfo GetGenericMethod(Type genericMethodContainingType, string genericMethodName) { return(GenericMethod.Get(genericMethodContainingType, genericMethodName)); }
public TValue Get(TArg1 arg1, TArg2 arg2) { return(_inner.Get(new Tuple <TArg1, TArg2>(arg1, arg2))); }