-
-
Notifications
You must be signed in to change notification settings - Fork 8.6k
[dotnet] Add C# 14 extension to polyfill ArgumentNullException.ThrowIfNull
#16697
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
base: trunk
Are you sure you want to change the base?
Conversation
PR Compliance Guide 🔍Below is a summary of compliance checks for this PR:
Compliance status legend🟢 - Fully Compliant🟡 - Partial Compliant 🔴 - Not Compliant ⚪ - Requires Further Human Verification 🏷️ - Compliance label |
|||||||||||||||||||||||||||||||||
PR Code Suggestions ✨Explore these optional code suggestions:
|
||||||||||||
|
Seems we need to explicitly specify:
|
Is that so? :( I eagerly await it, for now this can sit in the drafts. |
User description
This includes an internal language version bump, as well as some polyfill files. In exchange, we can use modern C# methods across all TFMs.
🔗 Related Issues
💥 What does this PR do?
🔧 Implementation Notes
💡 Additional Considerations
🔄 Types of changes
PR Type
Enhancement
Description
Replace manual null-check patterns with
ArgumentNullException.ThrowIfNull()Add C# 14 extension method polyfill for modern null validation
Reduce boilerplate code across 30+ files in WebDriver codebase
Maintain backward compatibility with older .NET target frameworks
Diagram Walkthrough
File Walkthrough
2 files
Add ThrowIfNull extension method polyfillAdd CallerArgumentExpression attribute polyfill26 files
Replace manual null check with ThrowIfNullReplace manual null check with ThrowIfNullReplace multiple manual null checks with ThrowIfNullReplace manual null check with ThrowIfNullReplace manual null checks with ThrowIfNullReplace multiple manual null checks with ThrowIfNullReplace manual null checks with ThrowIfNullReplace multiple manual null checks with ThrowIfNullReplace multiple manual null checks with ThrowIfNullReplace multiple manual null checks with ThrowIfNullReplace manual null check with ThrowIfNullReplace manual null check with ThrowIfNullReplace multiple manual null checks with ThrowIfNullReplace manual null check with ThrowIfNullReplace multiple manual null checks with ThrowIfNullReplace multiple manual null checks with ThrowIfNullReplace manual null check with ThrowIfNullReplace manual null check with ThrowIfNullReplace manual null check with ThrowIfNullReplace multiple manual null checks with ThrowIfNullReplace manual null check with ThrowIfNullReplace manual null checks with ThrowIfNullReplace manual null check with ThrowIfNullReplace multiple manual null checks with ThrowIfNullReplace manual null check with ThrowIfNullReplace multiple manual null checks with ThrowIfNull