You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
We cannot make this method static, or the event handling will fail. We should not report CC0091 in this scenario.
The way to fix this is alter the analyzer, which already checks method declarations, to ignore them if a signature with two parameters is found, where the first is of type object, and the second is a class that inherits from EventArgs, and the return is void or Task (or a descendant of Task).
The text was updated successfully, but these errors were encountered:
Same goes for Winforms - the code will compile with static methods, but everytime you go in the designer, the lines of designer codes using the static methods will be deleted.
Discussion started on #916.
If we have this in UWP and XAML:
And in the code behind:
We cannot make this method static, or the event handling will fail. We should not report CC0091 in this scenario.
The way to fix this is alter the analyzer, which already checks method declarations, to ignore them if a signature with two parameters is found, where the first is of type
object
, and the second is a class that inherits fromEventArgs
, and the return is void orTask
(or a descendant of Task).The text was updated successfully, but these errors were encountered: