Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add and use InvokeStaticAsLambda extension methods for MethodInfo #297

Closed
YevgeniyShunevych opened this issue Aug 23, 2019 · 0 comments

Comments

@YevgeniyShunevych
Copy link
Member

commented Aug 23, 2019

Add extensions methods to MethodInfoExtensions:

public static void InvokeStaticAsLambda(this MethodInfo method, params object[] args);

public static TResult InvokeStaticAsLambda<TResult>(this MethodInfo method, params object[] args);

public static MethodCallExpression ToStaticMethodCallExpression(this MethodInfo method, params object[] args);

Update occurences that use InvokeStatic to use InvokeStaticAsLambda to avoid TargetInvocationException.

@YevgeniyShunevych YevgeniyShunevych added this to the 1.3.0 milestone Aug 23, 2019
@YevgeniyShunevych YevgeniyShunevych self-assigned this Aug 23, 2019
YevgeniyShunevych added a commit that referenced this issue Aug 23, 2019
@YevgeniyShunevych YevgeniyShunevych changed the title Add InvokeStaticAsLambda extension methods for MethodInfo Add and use InvokeStaticAsLambda extension methods for MethodInfo Aug 23, 2019
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
1 participant
You can’t perform that action at this time.