-
-
Notifications
You must be signed in to change notification settings - Fork 8.4k
[dotnet] [bidi] Separate empty and base result #15593
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 Reviewer Guide 🔍Here are some key observations to aid the review process:
|
PR Code Suggestions ✨Explore these optional code suggestions:
|
Related to #15562, let's discuss there our expectations. |
True, we will avoid user facing |
User description
💥 What does this PR do?
The
EmptyResult
does two different things: act as a base type for all BiDi results, and act as a void result. We can separate these two responsibilities to two different types, leading to clearer code. Additionally, we can rest assured that anyEmptyResult
we get is not non-empty result without at runtime.PR Type
Enhancement, Other
Description
Replaced
EmptyResult
withBiDiResult
as the base type for BiDi command results.Refactored multiple command result classes to inherit from
BiDiResult
.Updated serialization and deserialization logic to accommodate the new
BiDiResult
type.Improved code clarity by separating void results (
EmptyResult
) from the base result type.Changes walkthrough 📝
25 files
Update command execution to use `BiDiResult`
Introduce `BiDiResult` and refactor command base
Update JSON serialization for `BiDiResult`
Adjust serialization logic for shared references
Update message success handling to use `BiDiResult`
Refactor `GetClientWindowsResult` to inherit `BiDiResult`
Refactor `GetUserContextsResult` to inherit `BiDiResult`
Update `UserContextInfo` to inherit `BiDiResult`
Refactor `CaptureScreenshotResult` to inherit `BiDiResult`
Update `CreateResult` to inherit `BiDiResult`
Refactor `GetTreeResult` to inherit `BiDiResult`
Update `LocateNodesResult` to inherit `BiDiResult`
Refactor `NavigateResult` to inherit `BiDiResult`
Update `PrintResult` to inherit `BiDiResult`
Refactor `TraverseHistoryResult` to inherit `BiDiResult`
Update `AddInterceptResult` to inherit `BiDiResult`
Refactor `AddPreloadScriptResult` to inherit `BiDiResult`
Update `EvaluateResult` hierarchy to inherit `BiDiResult`
Refactor `GetRealmsResult` to inherit `BiDiResult`
Update `NewResult` to inherit `BiDiResult`
Refactor `StatusResult` to inherit `BiDiResult`
Update `SubscribeResult` to inherit `BiDiResult`
Refactor `DeleteCookiesResult` to inherit `BiDiResult`
Update `GetCookiesResult` to inherit `BiDiResult`
Refactor `SetCookieResult` to inherit `BiDiResult`