More uses of ArgumentNullException.ThrowIfNull and ArgumentException.ThrowIfNullOrEmpty#8483
Open
halgab wants to merge 6 commits intodotnet:mainfrom
Open
More uses of ArgumentNullException.ThrowIfNull and ArgumentException.ThrowIfNullOrEmpty#8483halgab wants to merge 6 commits intodotnet:mainfrom
halgab wants to merge 6 commits intodotnet:mainfrom
Conversation
945d8a2 to
496c005
Compare
halgab
commented
Dec 1, 2023
Comment on lines
+299
to
+300
| ArgumentNullException.ThrowIfNull(stylusPointDescription1); | ||
| ArgumentNullException.ThrowIfNull(stylusPointDescription2); |
Contributor
Author
There was a problem hiding this comment.
I deliberately changed the error message here to reflect the actual parameter names
Comment on lines
+119
to
+120
| ArgumentNullException.ThrowIfNull(stylusPointPropertyInfo1); | ||
| ArgumentNullException.ThrowIfNull(stylusPointPropertyInfo2); |
src/Microsoft.DotNet.Wpf/src/PresentationFramework/System/Windows/Standard/Verify.cs
Show resolved
Hide resolved
| { | ||
| throw new ArgumentException(errorMessage, name); | ||
| } | ||
| ArgumentNullException.ThrowIfNullOrWhiteSpace(value, name); |
Contributor
Author
There was a problem hiding this comment.
ditto here, noting that this method looks unused anyay
496c005 to
a492a21
Compare
Kuldeep-MS
suggested changes
Feb 24, 2024
src/Microsoft.DotNet.Wpf/src/PresentationCore/System/Windows/DataFormat.cs
Outdated
Show resolved
Hide resolved
...tNet.Wpf/src/PresentationCore/System/Windows/Media/Animation/Generated/TimelineCollection.cs
Show resolved
Hide resolved
...tNet.Wpf/src/PresentationCore/System/Windows/Media/Animation/Generated/TimelineCollection.cs
Show resolved
Hide resolved
...osoft.DotNet.Wpf/src/PresentationCore/System/Windows/Media/Generated/TextEffectCollection.cs
Show resolved
Hide resolved
...osoft.DotNet.Wpf/src/PresentationCore/System/Windows/Media/Generated/TextEffectCollection.cs
Show resolved
Hide resolved
src/Microsoft.DotNet.Wpf/src/PresentationFramework/System/Windows/Setter.cs
Outdated
Show resolved
Hide resolved
src/Microsoft.DotNet.Wpf/src/PresentationFramework/System/Windows/Standard/Verify.cs
Show resolved
Hide resolved
Kuldeep-MS
reviewed
Feb 24, 2024
src/Microsoft.DotNet.Wpf/src/PresentationFramework/System/Windows/ControlTemplate.cs
Show resolved
Hide resolved
a492a21 to
b6b0e5b
Compare
Contributor
|
@halgab - There are multiple test failure has been reported for this PR. Could you please take a look? To name few of them are: -
|
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Follow-up to #8092 and others
Description
Use
ArgumentNullException.ThrowIfNullmore widely across codebase, addressing leftovers from previous PRs. This also makes some uses ofArgumentException.ThrowIfNullOrEmpty, and remove redundant custom error messages. Lastly, this replaces an internal throw helper withArgumentNullException.ThrowIfNull.Regression
No
Testing
CI
Risk
Low. Changes are mechanic
Microsoft Reviewers: Open in CodeFlow