Skip to content
This repository has been archived by the owner on Nov 8, 2018. It is now read-only.

Define the behavior of AvoidAsyncVoid for event handlers #15

Open
sharwell opened this issue May 5, 2015 · 6 comments
Open

Define the behavior of AvoidAsyncVoid for event handlers #15

sharwell opened this issue May 5, 2015 · 6 comments

Comments

@sharwell
Copy link
Member

sharwell commented May 5, 2015

Currently the AvoidAsyncVoid analyzer does not have any special consideration for event handlers. The desired behavior for these cases should be explicitly documented, even if the implementation is kept as-is.

@paulomorgado
Copy link

@sharwell, I don't understand what you mean. Do you mean that this should be reported for event handlers and explicitly ignored?

@sharwell
Copy link
Member Author

sharwell commented Jan 26, 2017

@paulomorgado I'm saying we should do one of the following:

  1. Keep the code as-is, but add documentation (using async void reports a diagnostic even if it's an event handler)
  2. Modify the code so async void event handlers are allowed and document it

@JohanLarsson
Copy link

Related: #53

@paulomorgado
Copy link

@sharwell, I'm sorry but I'm still not getting it.

By "modify the code" do you mean adding #pragma directives?

@sharwell
Copy link
Member Author

@paulomorgado No, I mean modify the way this analyzer examines code. Right now there is no special analysis for event handlers so they are analyzed the same way as any other method.

@paulomorgado
Copy link

Oh! I thought you're saying something else.

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
Development

No branches or pull requests

3 participants