-
-
Notifications
You must be signed in to change notification settings - Fork 8.6k
[dotnet] [bidi] Specific result type for any command #16405
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 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:
|
User description
Recently bidi specification started to use specific command result type for all commands, instead of just
EmptyResult
. And it is good.Contributes to #16095
💥 What does this PR do?
Add result types for all commands, avoid
EmptyResult
.🔧 Implementation Notes
CallFunctionAsync
still returnsEvaluateResult
, I cannot translate spec to .NET in elegant way.🔄 Types of changes
PR Type
Enhancement
Description
Replace EmptyResult with specific result types for all BiDi commands
Add new result classes inheriting from EmptyResult for type safety
Update JSON serialization context for new result types
Maintain backward compatibility through inheritance
Diagram Walkthrough
File Walkthrough
46 files
Replace EmptyResult with specific Browser result types
Add CloseResult type for browser close command
Add CreateUserContextResult inheriting from UserContextInfo
Add RemoveUserContextResult for remove command
Add SetDownloadBehaviorResult for download behavior
Change UserContextInfo from sealed to base record
Add ActivateResult for browsing context activation
Update method signatures with specific result types
Replace EmptyResult with specific Input result types
Update all browsing context methods with specific results
Add SetCacheBehaviorResult for network cache behavior
Add CloseResult for browsing context close
Add HandleUserPromptResult for user prompt handling
Change NavigateResult from sealed to base record
Add ReloadResult inheriting from NavigateResult
Add SetViewportResult for viewport configuration
Replace EmptyResult with specific Emulation result types
Add SetForcedColorsModeThemeOverrideResult
Add SetGeolocationOverrideResult for geolocation commands
Add SetLocaleOverrideResult for locale override
Add SetScreenOrientationOverrideResult
Add SetScriptingEnabledResult for scripting control
Add SetTimezoneOverrideResult for timezone override
Add SetUserAgentOverrideResult for user agent
Replace EmptyResult with specific Input result types
Add PerformActionsResult for action performance
Add ReleaseActionsResult for action release
Add SetFilesResult for file input handling
Add ContinueRequestResult for request continuation
Add ContinueResponseResult for response continuation
Add ContinueWithAuthResult for authentication handling
Add FailRequestResult for request failure
Replace EmptyResult with specific Network result types
Add ProvideResponseResult for response provision
Add RemoveDataCollectorResult for data collector removal
Add RemoveInterceptResult for intercept removal
Add SetCacheBehaviorResult for cache behavior
Add SetExtraHeadersResult for header configuration
Add DisownResult and DisownOptions for script disown
Add RemovePreloadScriptResult for script removal
Add DisownAsync method and update result types
Add EndResult for session termination
Replace EmptyResult with specific Session result types
Add UnsubscribeResult for subscription management
Add UninstallResult for extension uninstallation
Replace EmptyResult with UninstallResult
1 files
Remove extra whitespace formatting cleanup
1 files
Add JSON serialization for all new result types
1 files
Update tests to handle new result types