[dotnet][bidi] Add optional PromptUnload parameter when closing BrowsingContext and compiler helps #15254
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
User description
I started to add new optional
bool PromptUnload
parameter. And forgot to pass this option from caller!Motivation and Context
I observed that we can define all parameters for command in
ctor
, doesn't matter they are required or optional. Now, when we want to add new optional parameter for command, compiler helps us.Types of changes
Checklist
PR Type
Enhancement, Bug fix
Description
Refactored command parameter constructors to improve consistency.
Added
PromptUnload
parameter toCloseCommand
for better unload handling.Simplified optional parameter handling across BiDi modules.
Updated related tests and documentation for new parameter patterns.
Changes walkthrough 📝
29 files
Refactored command parameter handling in BrowsingContextModule
Simplified CaptureScreenshotCommandParameters constructor
Added PromptUnload parameter to CloseCommand
Refactored CreateCommandParameters to include optional fields
Simplified GetTreeCommandParameters constructor
Refactored HandleUserPromptCommandParameters to include optional
fields
Simplified LocateNodesCommandParameters constructor
Refactored NavigateCommandParameters to include optional fields
Simplified PrintCommandParameters constructor
Refactored ReloadCommandParameters to include optional fields
Simplified SetViewportCommandParameters constructor
Refactored AddInterceptCommandParameters to include optional fields
Simplified ContinueRequestCommandParameters constructor
Refactored ContinueResponseCommandParameters to include optional
fields
Updated NetworkModule to use simplified parameter constructors
Simplified ProvideResponseCommandParameters constructor
Refactored SetCacheBehaviorCommandParameters to include optional
fields
Simplified AddPreloadScriptCommandParameters constructor
Refactored CallFunctionCommandParameters to include optional fields
Simplified EvaluateCommandParameters constructor
Refactored GetRealmsCommandParameters to include optional fields
Updated ScriptModule to use simplified parameter constructors
Refactored SessionModule to use simplified parameter constructors
Simplified SubscribeCommandParameters constructor
Refactored UnsubscribeByAttributesCommandParameters to include
optional fields
Simplified DeleteCookiesCommandParameters constructor
Refactored GetCookiesCommandParameters to include optional fields
Simplified SetCookieCommandParameters constructor
Updated StorageModule to use simplified parameter constructors