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

Parameter validation for Async methods #180

Open
bgrainger opened this issue Feb 5, 2021 · 0 comments
Open

Parameter validation for Async methods #180

bgrainger opened this issue Feb 5, 2021 · 0 comments

Comments

@bgrainger
Copy link
Member

There are two general approaches for parameter validation (e.g., ArgumentNullException) with *Async methods:

  1. "Eagerly" throw the exception before the Task is created; this requires a non-async method that calls the async helper.
  2. Return a faulted Task holding the ArgumentException; this happens by default if parameter checking happens in an async method.

Test if ADO.NET providers differ in how they implement this.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Development

No branches or pull requests

1 participant