Skip to content

Commit

Permalink
fix: get the right methodinfo
Browse files Browse the repository at this point in the history
  • Loading branch information
pksorensen committed Jul 30, 2022
1 parent e82d1a4 commit 19a2765
Showing 1 changed file with 1 addition and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@ public class HangFirePluginJobRunnerContext : IFormattable
{
static HangFirePluginJobRunnerContext()
{
ExecuteAsyncMethod = typeof(HangFirePluginJobRunnerContext).GetMethods().Single(m => m.IsGenericMethod && m.Name == nameof(HangFirePluginJobRunnerContext.ExecuteAsync));
ExecuteAsyncMethod = typeof(HangFirePluginJobRunnerContext).GetMethods().Single(m => m.IsGenericMethod && m.GetGenericArguments().Length == 2 && m.Name == nameof(HangFirePluginJobRunnerContext.ExecuteAsync));
}

public static MethodInfo ExecuteAsyncMethod { get; }
Expand Down

0 comments on commit 19a2765

Please sign in to comment.