-
Notifications
You must be signed in to change notification settings - Fork 13
Closed
Description
We have an event
event EventHandler<CurrentItemChangedEventArgs<T>> CurrentItemChanged
and when registering an async void on this event, AsyncFixer03 raise an error.
I looked at your code and I found this method
public static bool HasEventArgsParameter(this MethodDeclarationSyntax method)
{
return method.ParameterList != null &&
method.ParameterList.Parameters.Any(param => param.Type.ToString().EndsWith("EventArgs", StringComparison.OrdinalIgnoreCase));
}
Proposed fix
public static bool HasEventArgsParameter(this MethodDeclarationSyntax method)
{
return method.ParameterList != null &&
method.ParameterList.Parameters.Any(param => typeof(EventArgs).IsAssignableFrom(param.Type));
}
Metadata
Metadata
Assignees
Labels
No labels