Skip to content

Conversation

@halgab
Copy link
Contributor

@halgab halgab commented Nov 8, 2023

Description

Use ArgumentOutOfRangeException.ThrowIf* across codebase. A lot of potential use cases are not covered yet because CA1512 cannot automatically take care of them though

Regression

No

Testing

CI

Risk

Low. We use fixer CA1512

Microsoft Reviewers: Open in CodeFlow

@ghost ghost assigned halgab Nov 8, 2023
@ghost ghost added the PR metadata: Label to tag PRs, to facilitate with triage label Nov 8, 2023
@ghost ghost requested review from dipeshmsft and singhashish-wpf November 8, 2023 09:42
@ghost ghost added the Community Contribution A label for all community Contributions label Nov 8, 2023
a bug in the fixer?
@ghost ghost added the draft label Nov 8, 2023
{
throw new ArgumentOutOfRangeException("timeout");
}
ArgumentOutOfRangeException.ThrowIfEqual(timeout, Duration.Automatic);
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I had to roll this back because Duration does not implement IEquatable. That would make sense though, and would be trivial to implement

@rchauhan18
Copy link
Contributor

Thanks @halgab for contributing!

@halgab halgab deleted the aoore-helpers branch November 29, 2023 12:01
@github-actions github-actions bot locked and limited conversation to collaborators Dec 30, 2023
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Labels

Community Contribution A label for all community Contributions PR metadata: Label to tag PRs, to facilitate with triage

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants