- 
          
 - 
                Notifications
    
You must be signed in to change notification settings  - Fork 8.6k
 
          [dotnet] Make the devtools SendCommand method AOT-safe
          #15159
        
          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
Conversation
          PR Reviewer Guide 🔍(Review updated until commit de38b25)Here are some key observations to aid the review process: 
  | 
    
          PR Code Suggestions ✨Latest suggestions up to de38b25 
 Previous suggestionsSuggestions up to commit 2d241d0
  | 
    
SendCommand method AOT-safe
      | 
           @nvborisenko re-opening this because of a remark I noticed in #13994: 
 This is the lower-level CDP functionality: sending   | 
    
| 
           I misunderstood which methods were staying and which ones were going after the CDP depreciation. This PR is no longer worthwhile.  | 
    
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
This uses source-generated JSON serialization on more devtools-related types.
Motivation and Context
Contributes to #14480
Types of changes
Checklist
PR Type
Enhancement
Description
Introduced source-generated JSON serialization for DevTools types.
Added
JsonSerializerContextfor improved serialization performance.Ignored
DomMutationData.Elementduring JSON operations.Replaced generic serialization calls with context-specific serialization.
Changes walkthrough 📝
DevToolsSession.cs
Use context-specific JSON serialization in DevToolsSessiondotnet/src/webdriver/DevTools/DevToolsSession.cs
serialization.
DevToolsSessionSerializerContextfor DevTools types.DomMutationData.cs
Ignore `Element` property during JSON serializationdotnet/src/webdriver/DomMutationData.cs
JsonIgnoreattribute toElementproperty.Elementduring JSON operations.JavaScriptEngine.cs
Use context-specific JSON deserialization in JavaScriptEnginedotnet/src/webdriver/JavaScriptEngine.cs
deserialization.
JsonEngineSerializerContextforDomMutationData.