-
-
Notifications
You must be signed in to change notification settings - Fork 8.5k
[dotnet] Modernize code style in the devtools source generator #15067
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
[dotnet] Modernize code style in the devtools source generator #15067
Conversation
PR Reviewer Guide 🔍Here are some key observations to aid the review process:
|
PR Code Suggestions ✨Explore these optional code suggestions:
|
third_party/dotnet/devtools/src/generator/CodeGen/CodeGenerationDefinitionTemplateSettings.cs
Show resolved
Hide resolved
third_party/dotnet/devtools/src/generator/ProtocolDefinition/CommandDefinition.cs
Show resolved
Hide resolved
Does it make sense to spend time on something what will be deprecated? I don't think so. |
…iumHQ#15067) * [dotnet] Modernize code style in the devtools source generator
…iumHQ#15067) * [dotnet] Modernize code style in the devtools source generator
User description
Thanks for contributing to Selenium!
A PR well described will help maintainers to quickly review and merge it
Before submitting your PR, please check our contributing guidelines.
Avoid large PRs, help reviewers by making them as simple and short as possible.
Description
Simplifies the code using modern C# features.
Motivation and Context
Splitting this off from some devtools source generator work I'm trying to figure out.
Types of changes
Checklist
PR Type
Enhancement
Description
Modernized C# code style using advanced language features.
Replaced constructors with inline property initializations.
Simplified
foreach
loops and improved type safety.Removed redundant
using
directives for cleaner code.Changes walkthrough 📝
10 files
Simplified property initialization for template settings.
Replaced constructor defaults with inline initializations.
Simplified service provider initialization.
Improved type safety in `foreach` loops.
Improved type safety and simplified `foreach` loops.
Improved null checks and type safety in helpers.
Replaced constructor defaults with inline initializations.
Replaced constructor defaults with inline initializations.
Replaced constructor defaults with inline initializations.
Replaced constructor defaults with inline initializations.
9 files
Removed redundant `using` directives.
Removed redundant `using` directives.
Removed redundant `using` directives.
Removed redundant `using` directives.
Removed redundant `using` directives.
Removed redundant `using` directives.
Removed redundant `using` directives.
Fixed spacing in help text for output path.
Removed redundant `using` directives.
1 files
Fixed type in service registration for protocol generator.
5 files