- 
          
- 
        Couldn't load subscription status. 
- 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
CallFunctionAsyncstill 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 typesAdd CloseResult type for browser close commandAdd CreateUserContextResult inheriting from UserContextInfoAdd RemoveUserContextResult for remove commandAdd SetDownloadBehaviorResult for download behaviorChange UserContextInfo from sealed to base recordAdd ActivateResult for browsing context activationUpdate method signatures with specific result typesReplace EmptyResult with specific Input result typesUpdate all browsing context methods with specific resultsAdd SetCacheBehaviorResult for network cache behaviorAdd CloseResult for browsing context closeAdd HandleUserPromptResult for user prompt handlingChange NavigateResult from sealed to base recordAdd ReloadResult inheriting from NavigateResultAdd SetViewportResult for viewport configurationReplace EmptyResult with specific Emulation result typesAdd SetForcedColorsModeThemeOverrideResultAdd SetGeolocationOverrideResult for geolocation commandsAdd SetLocaleOverrideResult for locale overrideAdd SetScreenOrientationOverrideResultAdd SetScriptingEnabledResult for scripting controlAdd SetTimezoneOverrideResult for timezone overrideAdd SetUserAgentOverrideResult for user agentReplace EmptyResult with specific Input result typesAdd PerformActionsResult for action performanceAdd ReleaseActionsResult for action releaseAdd SetFilesResult for file input handlingAdd ContinueRequestResult for request continuationAdd ContinueResponseResult for response continuationAdd ContinueWithAuthResult for authentication handlingAdd FailRequestResult for request failureReplace EmptyResult with specific Network result typesAdd ProvideResponseResult for response provisionAdd RemoveDataCollectorResult for data collector removalAdd RemoveInterceptResult for intercept removalAdd SetCacheBehaviorResult for cache behaviorAdd SetExtraHeadersResult for header configurationAdd DisownResult and DisownOptions for script disownAdd RemovePreloadScriptResult for script removalAdd DisownAsync method and update result typesAdd EndResult for session terminationReplace EmptyResult with specific Session result typesAdd UnsubscribeResult for subscription managementAdd UninstallResult for extension uninstallationReplace EmptyResult with UninstallResult1 files
Remove extra whitespace formatting cleanup1 files
Add JSON serialization for all new result types1 files
Update tests to handle new result types