-
Notifications
You must be signed in to change notification settings - Fork 8.1k
Use ArgumentException.ThrowIfNullOrEmpty() in more places #19213
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
Changes from all commits
e2c0848
532b7d7
d30aa17
4eef59d
bdd6754
8cbe758
69cefdd
e7efc17
13699ab
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -419,10 +419,7 @@ public static T GetOptionalTemplateChild<T>(Control templateParent, string child | |
| { | ||
| ArgumentNullException.ThrowIfNull(templateParent); | ||
|
|
||
| if (string.IsNullOrEmpty(childName)) | ||
| { | ||
| throw new ArgumentNullException("childName"); | ||
| } | ||
| ArgumentException.ThrowIfNullOrEmpty(childName); | ||
|
Collaborator
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Extra blank line 😄
Member
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. @CarloToso you and I both missed this one ...
Contributor
Author
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. 😅 (I fixed it in #19241)
Member
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Thank you! 😄 |
||
|
|
||
| object templatePart = templateParent.Template.FindName(childName, templateParent); | ||
| T item = templatePart as T; | ||
|
|
||
Uh oh!
There was an error while loading. Please reload this page.