[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 PromptUnloadparameter. 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
PromptUnloadparameter toCloseCommandfor 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 BrowsingContextModuleSimplified CaptureScreenshotCommandParameters constructorAdded PromptUnload parameter to CloseCommandRefactored CreateCommandParameters to include optional fieldsSimplified GetTreeCommandParameters constructorRefactored HandleUserPromptCommandParameters to include optionalfieldsSimplified LocateNodesCommandParameters constructorRefactored NavigateCommandParameters to include optional fieldsSimplified PrintCommandParameters constructorRefactored ReloadCommandParameters to include optional fieldsSimplified SetViewportCommandParameters constructorRefactored AddInterceptCommandParameters to include optional fieldsSimplified ContinueRequestCommandParameters constructorRefactored ContinueResponseCommandParameters to include optionalfieldsUpdated NetworkModule to use simplified parameter constructorsSimplified ProvideResponseCommandParameters constructorRefactored SetCacheBehaviorCommandParameters to include optionalfieldsSimplified AddPreloadScriptCommandParameters constructorRefactored CallFunctionCommandParameters to include optional fieldsSimplified EvaluateCommandParameters constructorRefactored GetRealmsCommandParameters to include optional fieldsUpdated ScriptModule to use simplified parameter constructorsRefactored SessionModule to use simplified parameter constructorsSimplified SubscribeCommandParameters constructorRefactored UnsubscribeByAttributesCommandParameters to includeoptional fieldsSimplified DeleteCookiesCommandParameters constructorRefactored GetCookiesCommandParameters to include optional fieldsSimplified SetCookieCommandParameters constructorUpdated StorageModule to use simplified parameter constructors