[dotnet] [bidi] Statically declare commands#17330
Conversation
Review Summary by Qodo[dotnet] [bidi] Refactor to statically declare commands using CommandDescriptor
WalkthroughsDescription• Replace concrete command classes with static CommandDescriptor instances for cleaner command definition • Refactor ExecuteCommandAsync to ExecuteAsync method accepting CommandDescriptor and parameters • Update JSON serialization to use parameter types instead of command wrapper classes • Change module visibility from public to internal for better encapsulation • Simplify command execution by removing intermediate command object allocation File Changes1. dotnet/src/webdriver/BiDi/Command.cs
|
Code Review by Qodo
|
There was a problem hiding this comment.
Pull request overview
Refactors the .NET BiDi implementation to define commands statically (via CommandDescriptor) and execute them through a single Broker.ExecuteAsync pathway, reducing per-call allocations and simplifying JSON source-generation requirements.
Changes:
- Introduces
CommandDescriptor<TParameters, TResult>and updates command execution to serialize{ id, method, params }directly inBroker. - Replaces numerous concrete
*Commandclasses with staticCommandDescriptorfields + parameter records across modules. - Updates JSON source-generation attributes to reference parameter/result types and narrows visibility of several module implementations.
Reviewed changes
Copilot reviewed 82 out of 82 changed files in this pull request and generated 4 comments.
Show a summary per file
| File | Description |
|---|---|
| dotnet/test/webdriver/BiDi/Session/SessionTests.cs | Updates custom module test to use CommandDescriptor + ExecuteAsync. |
| dotnet/src/webdriver/BiDi/Broker.cs | Implements ExecuteAsync and manual request JSON serialization using descriptors. |
| dotnet/src/webdriver/BiDi/Command.cs | Replaces Command hierarchy with CommandDescriptor; keeps Parameters/EmptyResult. |
| dotnet/src/webdriver/BiDi/Module.cs | Switches base module execution helper to ExecuteAsync(descriptor, params, ...). |
| dotnet/src/webdriver/BiDi/Browser/BrowserModule.cs | Converts browser commands to static descriptors; changes module implementation visibility. |
| dotnet/src/webdriver/BiDi/Browser/Close.cs | Removes concrete command class, leaving params/result types. |
| dotnet/src/webdriver/BiDi/Browser/CreateUserContext.cs | Removes concrete command class, leaving params/result types. |
| dotnet/src/webdriver/BiDi/Browser/GetClientWindows.cs | Removes concrete command class, leaving options/result types. |
| dotnet/src/webdriver/BiDi/Browser/GetUserContexts.cs | Removes concrete command class, leaving options/result types. |
| dotnet/src/webdriver/BiDi/Browser/RemoveUserContext.cs | Removes concrete command class, leaving params/result types. |
| dotnet/src/webdriver/BiDi/Browser/SetDownloadBehavior.cs | Removes concrete command class, leaving params/result types. |
| dotnet/src/webdriver/BiDi/BrowsingContext/BrowsingContextModule.cs | Converts browsingContext commands to static descriptors; updates subscribe contexts. |
| dotnet/src/webdriver/BiDi/BrowsingContext/Activate.cs | Removes concrete command class, leaving params/result types. |
| dotnet/src/webdriver/BiDi/BrowsingContext/CaptureScreenshot.cs | Removes concrete command class, leaving params/result types. |
| dotnet/src/webdriver/BiDi/BrowsingContext/Close.cs | Removes concrete command class, leaving params/result types. |
| dotnet/src/webdriver/BiDi/BrowsingContext/Create.cs | Removes concrete command class, leaving params/result types. |
| dotnet/src/webdriver/BiDi/BrowsingContext/GetTree.cs | Removes concrete command class, leaving params/result types. |
| dotnet/src/webdriver/BiDi/BrowsingContext/HandleUserPrompt.cs | Removes concrete command class, leaving params/result types. |
| dotnet/src/webdriver/BiDi/BrowsingContext/LocateNodes.cs | Removes concrete command class, leaving params/result types. |
| dotnet/src/webdriver/BiDi/BrowsingContext/Navigate.cs | Removes concrete command class, leaving params/result types. |
| dotnet/src/webdriver/BiDi/BrowsingContext/Print.cs | Removes concrete command class, leaving params/result types. |
| dotnet/src/webdriver/BiDi/BrowsingContext/Reload.cs | Removes concrete command class, leaving params/result types. |
| dotnet/src/webdriver/BiDi/BrowsingContext/SetViewport.cs | Removes concrete command class, leaving params/result types. |
| dotnet/src/webdriver/BiDi/BrowsingContext/TraverseHistory.cs | Removes concrete command class, leaving params/result types. |
| dotnet/src/webdriver/BiDi/BrowsingContext/BrowsingContextInputModule.cs | Narrows wrapper module visibility while keeping interface-based surface. |
| dotnet/src/webdriver/BiDi/BrowsingContext/BrowsingContextLogModule.cs | Narrows wrapper module visibility while keeping interface-based surface. |
| dotnet/src/webdriver/BiDi/BrowsingContext/BrowsingContextNetworkModule.cs | Narrows wrapper module visibility while keeping interface-based surface. |
| dotnet/src/webdriver/BiDi/BrowsingContext/BrowsingContextScriptModule.cs | Narrows wrapper module visibility while keeping interface-based surface. |
| dotnet/src/webdriver/BiDi/BrowsingContext/BrowsingContextStorageModule.cs | Narrows wrapper module visibility while keeping interface-based surface. |
| dotnet/src/webdriver/BiDi/Emulation/EmulationModule.cs | Converts emulation commands to static descriptors; updates source-gen types. |
| dotnet/src/webdriver/BiDi/Emulation/SetForcedColorsModeThemeOverride.cs | Removes concrete command class, leaving params/result types. |
| dotnet/src/webdriver/BiDi/Emulation/SetGeolocationOverride.cs | Removes concrete command class, leaving polymorphic params/result types. |
| dotnet/src/webdriver/BiDi/Emulation/SetLocaleOverride.cs | Removes concrete command class, leaving params/result types. |
| dotnet/src/webdriver/BiDi/Emulation/SetNetworkConditions.cs | Removes concrete command class, leaving polymorphic params/result types. |
| dotnet/src/webdriver/BiDi/Emulation/SetScreenOrientationOverride.cs | Removes concrete command class, leaving params/result types. |
| dotnet/src/webdriver/BiDi/Emulation/SetScreenSettingsOverride.cs | Removes concrete command class, leaving params/result types. |
| dotnet/src/webdriver/BiDi/Emulation/SetScriptingEnabled.cs | Removes concrete command class, leaving params/result types. |
| dotnet/src/webdriver/BiDi/Emulation/SetScrollbarTypeOverride.cs | Removes concrete command class, leaving params/result types. |
| dotnet/src/webdriver/BiDi/Emulation/SetTimezoneOverride.cs | Removes concrete command class, leaving params/result types. |
| dotnet/src/webdriver/BiDi/Emulation/SetTouchOverride.cs | Removes concrete command class, leaving params/result types. |
| dotnet/src/webdriver/BiDi/Emulation/SetUserAgentOverride.cs | Removes concrete command class, leaving params/result types. |
| dotnet/src/webdriver/BiDi/Input/InputModule.cs | Converts input commands to static descriptors; updates subscribe contexts. |
| dotnet/src/webdriver/BiDi/Input/PerformActions.cs | Removes concrete command class, leaving params/result types. |
| dotnet/src/webdriver/BiDi/Input/ReleaseActions.cs | Removes concrete command class, leaving params/result types. |
| dotnet/src/webdriver/BiDi/Input/SetFiles.cs | Removes concrete command class, leaving params/result types. |
| dotnet/src/webdriver/BiDi/Log/LogModule.cs | Updates subscription serialization references and narrows module visibility. |
| dotnet/src/webdriver/BiDi/Network/NetworkModule.cs | Converts network commands to static descriptors; updates subscribe contexts. |
| dotnet/src/webdriver/BiDi/Network/AddDataCollector.cs | Removes concrete command class, leaving params/result types. |
| dotnet/src/webdriver/BiDi/Network/AddIntercept.cs | Removes concrete command class, leaving params/result types. |
| dotnet/src/webdriver/BiDi/Network/ContinueRequest.cs | Removes concrete command class, leaving params/result types. |
| dotnet/src/webdriver/BiDi/Network/ContinueResponse.cs | Removes concrete command class, leaving params/result types. |
| dotnet/src/webdriver/BiDi/Network/ContinueWithAuth.cs | Removes concrete command class, leaving polymorphic params/result types. |
| dotnet/src/webdriver/BiDi/Network/FailRequest.cs | Removes concrete command class, leaving params/result types. |
| dotnet/src/webdriver/BiDi/Network/GetData.cs | Removes concrete command class, leaving params/result types. |
| dotnet/src/webdriver/BiDi/Network/ProvideResponse.cs | Removes concrete command class, leaving params/result types. |
| dotnet/src/webdriver/BiDi/Network/RemoveDataCollector.cs | Removes concrete command class, leaving params/result types. |
| dotnet/src/webdriver/BiDi/Network/RemoveIntercept.cs | Removes concrete command class, leaving params/result types. |
| dotnet/src/webdriver/BiDi/Network/SetCacheBehavior.cs | Removes concrete command class, leaving params/result types. |
| dotnet/src/webdriver/BiDi/Network/SetExtraHeaders.cs | Removes concrete command class, leaving params/result types. |
| dotnet/src/webdriver/BiDi/Permissions/PermissionsModule.cs | Converts permissions command to a static descriptor; updates source-gen types. |
| dotnet/src/webdriver/BiDi/Permissions/SetPermission.cs | Removes concrete command class, leaving params/result types. |
| dotnet/src/webdriver/BiDi/Script/ScriptModule.cs | Converts script commands to static descriptors; updates subscribe contexts and source-gen. |
| dotnet/src/webdriver/BiDi/Script/AddPreloadScript.cs | Removes concrete command class, leaving params/result types. |
| dotnet/src/webdriver/BiDi/Script/CallFunction.cs | Removes concrete command class, leaving params/result types. |
| dotnet/src/webdriver/BiDi/Script/Disown.cs | Removes concrete command class, leaving params/result types. |
| dotnet/src/webdriver/BiDi/Script/Evaluate.cs | Removes concrete command class, leaving params/result types. |
| dotnet/src/webdriver/BiDi/Script/GetRealms.cs | Removes concrete command class, leaving params/result types. |
| dotnet/src/webdriver/BiDi/Script/RemovePreloadScript.cs | Removes concrete command class, leaving params/result types. |
| dotnet/src/webdriver/BiDi/Session/SessionModule.cs | Converts session commands to static descriptors; updates source-gen types. |
| dotnet/src/webdriver/BiDi/Session/End.cs | Removes concrete command class, leaving options/result types. |
| dotnet/src/webdriver/BiDi/Session/New.cs | Removes concrete command class, leaving params/result types. |
| dotnet/src/webdriver/BiDi/Session/Status.cs | Removes concrete command class, leaving options/result types. |
| dotnet/src/webdriver/BiDi/Session/Subscribe.cs | Removes concrete command class, leaving params/result types. |
| dotnet/src/webdriver/BiDi/Session/Unsubscribe.cs | Removes concrete command class, leaving params/result types. |
| dotnet/src/webdriver/BiDi/Speculation/SpeculationModule.cs | Updates subscription serialization references and narrows module visibility. |
| dotnet/src/webdriver/BiDi/Storage/StorageModule.cs | Converts storage commands to static descriptors; updates source-gen types. |
| dotnet/src/webdriver/BiDi/Storage/DeleteCookies.cs | Removes concrete command class, leaving params/result types. |
| dotnet/src/webdriver/BiDi/Storage/GetCookies.cs | Removes concrete command class, leaving params/result types. |
| dotnet/src/webdriver/BiDi/Storage/SetCookie.cs | Removes concrete command class, leaving params/result types. |
| dotnet/src/webdriver/BiDi/WebExtension/WebExtensionModule.cs | Converts webExtension commands to static descriptors; updates source-gen types. |
| dotnet/src/webdriver/BiDi/WebExtension/Install.cs | Removes concrete command class, leaving params/result types. |
| dotnet/src/webdriver/BiDi/WebExtension/Uninstall.cs | Removes concrete command class, leaving params/result types. |
Updated [Microsoft.AspNetCore.Components.Authorization](https://github.com/dotnet/aspnetcore) from 8.0.26 to 8.0.27. <details> <summary>Release notes</summary> _Sourced from [Microsoft.AspNetCore.Components.Authorization's releases](https://github.com/dotnet/aspnetcore/releases)._ ## 8.0.27 [Release](https://github.com/dotnet/core/releases/tag/v8.0.27) ## What's Changed * [release/8.0] Update branding to 8.0.27 by @vseanreesermsft in dotnet/aspnetcore#66205 * [release/8.0] Update NPM dependencies by @wtgodbe in dotnet/aspnetcore#66052 * [release/8.0] Move off of dead-lettered Windows preview helix queue by @wtgodbe in dotnet/aspnetcore#66220 * [release/8.0] (deps): Bump src/submodules/googletest from `73a63ea` to `d72f9c8` by @dependabot[bot] in dotnet/aspnetcore#66087 * [release/8.0] Replace dn-bot-dnceng-build-rw-code-rw PAT with WIF service connection in mirror-within-azdo by @missymessa in dotnet/aspnetcore#66115 * [release/8.0] Update dependencies from dotnet/source-build-externals by @dotnet-maestro[bot] in dotnet/aspnetcore#66216 * [release/8.0] Update dependencies from dotnet/arcade by @dotnet-maestro[bot] in dotnet/aspnetcore#66081 * [release/8.0] Update dependencies from dotnet/source-build-reference-packages by @dotnet-maestro[bot] in dotnet/aspnetcore#66131 * [release/8.0] Update @azure/msal-browser from 2.x to 4.x by @wtgodbe in dotnet/aspnetcore#66236 * [release/8.0] Use source-build-assets repo by @NikolaMilosavljevic in dotnet/aspnetcore#66276 * Merging internal commits for release/8.0 by @vseanreesermsft in dotnet/aspnetcore#66317 **Full Changelog**: dotnet/aspnetcore@v8.0.26...v8.0.27 Commits viewable in [compare view](dotnet/aspnetcore@v8.0.26...v8.0.27). </details> Updated [Microsoft.AspNetCore.Components.WebAssembly](https://github.com/dotnet/aspnetcore) from 8.0.26 to 8.0.27. <details> <summary>Release notes</summary> _Sourced from [Microsoft.AspNetCore.Components.WebAssembly's releases](https://github.com/dotnet/aspnetcore/releases)._ ## 8.0.27 [Release](https://github.com/dotnet/core/releases/tag/v8.0.27) ## What's Changed * [release/8.0] Update branding to 8.0.27 by @vseanreesermsft in dotnet/aspnetcore#66205 * [release/8.0] Update NPM dependencies by @wtgodbe in dotnet/aspnetcore#66052 * [release/8.0] Move off of dead-lettered Windows preview helix queue by @wtgodbe in dotnet/aspnetcore#66220 * [release/8.0] (deps): Bump src/submodules/googletest from `73a63ea` to `d72f9c8` by @dependabot[bot] in dotnet/aspnetcore#66087 * [release/8.0] Replace dn-bot-dnceng-build-rw-code-rw PAT with WIF service connection in mirror-within-azdo by @missymessa in dotnet/aspnetcore#66115 * [release/8.0] Update dependencies from dotnet/source-build-externals by @dotnet-maestro[bot] in dotnet/aspnetcore#66216 * [release/8.0] Update dependencies from dotnet/arcade by @dotnet-maestro[bot] in dotnet/aspnetcore#66081 * [release/8.0] Update dependencies from dotnet/source-build-reference-packages by @dotnet-maestro[bot] in dotnet/aspnetcore#66131 * [release/8.0] Update @azure/msal-browser from 2.x to 4.x by @wtgodbe in dotnet/aspnetcore#66236 * [release/8.0] Use source-build-assets repo by @NikolaMilosavljevic in dotnet/aspnetcore#66276 * Merging internal commits for release/8.0 by @vseanreesermsft in dotnet/aspnetcore#66317 **Full Changelog**: dotnet/aspnetcore@v8.0.26...v8.0.27 Commits viewable in [compare view](dotnet/aspnetcore@v8.0.26...v8.0.27). </details> Updated [Microsoft.AspNetCore.Components.WebAssembly.DevServer](https://github.com/dotnet/dotnet) from 10.0.7 to 10.0.8. <details> <summary>Release notes</summary> _Sourced from [Microsoft.AspNetCore.Components.WebAssembly.DevServer's releases](https://github.com/dotnet/dotnet/releases)._ No release notes found for this version range. Commits viewable in [compare view](https://github.com/dotnet/dotnet/commits). </details> Updated [Microsoft.AspNetCore.Http.Abstractions](https://github.com/dotnet/aspnetcore) from 2.3.9 to 2.3.10. <details> <summary>Release notes</summary> _Sourced from [Microsoft.AspNetCore.Http.Abstractions's releases](https://github.com/dotnet/aspnetcore/releases)._ No release notes found for this version range. Commits viewable in [compare view](https://github.com/dotnet/aspnetcore/commits). </details> Updated [Microsoft.AspNetCore.Mvc.Testing](https://github.com/dotnet/aspnetcore) from 8.0.26 to 8.0.27. <details> <summary>Release notes</summary> _Sourced from [Microsoft.AspNetCore.Mvc.Testing's releases](https://github.com/dotnet/aspnetcore/releases)._ ## 8.0.27 [Release](https://github.com/dotnet/core/releases/tag/v8.0.27) ## What's Changed * [release/8.0] Update branding to 8.0.27 by @vseanreesermsft in dotnet/aspnetcore#66205 * [release/8.0] Update NPM dependencies by @wtgodbe in dotnet/aspnetcore#66052 * [release/8.0] Move off of dead-lettered Windows preview helix queue by @wtgodbe in dotnet/aspnetcore#66220 * [release/8.0] (deps): Bump src/submodules/googletest from `73a63ea` to `d72f9c8` by @dependabot[bot] in dotnet/aspnetcore#66087 * [release/8.0] Replace dn-bot-dnceng-build-rw-code-rw PAT with WIF service connection in mirror-within-azdo by @missymessa in dotnet/aspnetcore#66115 * [release/8.0] Update dependencies from dotnet/source-build-externals by @dotnet-maestro[bot] in dotnet/aspnetcore#66216 * [release/8.0] Update dependencies from dotnet/arcade by @dotnet-maestro[bot] in dotnet/aspnetcore#66081 * [release/8.0] Update dependencies from dotnet/source-build-reference-packages by @dotnet-maestro[bot] in dotnet/aspnetcore#66131 * [release/8.0] Update @azure/msal-browser from 2.x to 4.x by @wtgodbe in dotnet/aspnetcore#66236 * [release/8.0] Use source-build-assets repo by @NikolaMilosavljevic in dotnet/aspnetcore#66276 * Merging internal commits for release/8.0 by @vseanreesermsft in dotnet/aspnetcore#66317 **Full Changelog**: dotnet/aspnetcore@v8.0.26...v8.0.27 Commits viewable in [compare view](dotnet/aspnetcore@v8.0.26...v8.0.27). </details> Updated [Microsoft.AspNetCore.OpenApi](https://github.com/dotnet/aspnetcore) from 8.0.26 to 8.0.27. <details> <summary>Release notes</summary> _Sourced from [Microsoft.AspNetCore.OpenApi's releases](https://github.com/dotnet/aspnetcore/releases)._ ## 8.0.27 [Release](https://github.com/dotnet/core/releases/tag/v8.0.27) ## What's Changed * [release/8.0] Update branding to 8.0.27 by @vseanreesermsft in dotnet/aspnetcore#66205 * [release/8.0] Update NPM dependencies by @wtgodbe in dotnet/aspnetcore#66052 * [release/8.0] Move off of dead-lettered Windows preview helix queue by @wtgodbe in dotnet/aspnetcore#66220 * [release/8.0] (deps): Bump src/submodules/googletest from `73a63ea` to `d72f9c8` by @dependabot[bot] in dotnet/aspnetcore#66087 * [release/8.0] Replace dn-bot-dnceng-build-rw-code-rw PAT with WIF service connection in mirror-within-azdo by @missymessa in dotnet/aspnetcore#66115 * [release/8.0] Update dependencies from dotnet/source-build-externals by @dotnet-maestro[bot] in dotnet/aspnetcore#66216 * [release/8.0] Update dependencies from dotnet/arcade by @dotnet-maestro[bot] in dotnet/aspnetcore#66081 * [release/8.0] Update dependencies from dotnet/source-build-reference-packages by @dotnet-maestro[bot] in dotnet/aspnetcore#66131 * [release/8.0] Update @azure/msal-browser from 2.x to 4.x by @wtgodbe in dotnet/aspnetcore#66236 * [release/8.0] Use source-build-assets repo by @NikolaMilosavljevic in dotnet/aspnetcore#66276 * Merging internal commits for release/8.0 by @vseanreesermsft in dotnet/aspnetcore#66317 **Full Changelog**: dotnet/aspnetcore@v8.0.26...v8.0.27 Commits viewable in [compare view](dotnet/aspnetcore@v8.0.26...v8.0.27). </details> Updated [Microsoft.EntityFrameworkCore](https://github.com/dotnet/efcore) from 9.0.15 to 9.0.16. <details> <summary>Release notes</summary> _Sourced from [Microsoft.EntityFrameworkCore's releases](https://github.com/dotnet/efcore/releases)._ ## 9.0.16 [Release](https://github.com/dotnet/core/releases/tag/v9.0.16) ## What's Changed * Merging internal commits for release/8.0 by @vseanreesermsft in dotnet/efcore#37900 * [release/9.0] Update dependencies from dotnet/arcade by @dotnet-maestro[bot] in dotnet/efcore#37969 * [release/8.0] Update dependencies from dotnet/arcade by @dotnet-maestro[bot] in dotnet/efcore#38034 * [release/8.0] Update branding to 8.0.27 by @vseanreesermsft in dotnet/efcore#38062 * [release/9.0] Update branding to 9.0.16 by @vseanreesermsft in dotnet/efcore#38063 * [release/9.0] Update dependencies from dotnet/arcade by @dotnet-maestro[bot] in dotnet/efcore#38053 * [automated] Merge branch 'release/8.0' => 'release/9.0' by @github-actions[bot] in dotnet/efcore#37908 * Merging internal commits for release/8.0 by @vseanreesermsft in dotnet/efcore#38099 * [automated] Merge branch 'release/8.0' => 'release/9.0' by @github-actions[bot] in dotnet/efcore#38101 * Merging internal commits for release/9.0 by @vseanreesermsft in dotnet/efcore#38098 * [release/9.0] Update dependencies from dotnet/arcade by @dotnet-maestro[bot] in dotnet/efcore#38170 **Full Changelog**: dotnet/efcore@v9.0.15...v9.0.16 Commits viewable in [compare view](dotnet/efcore@v9.0.15...v9.0.16). </details> Updated [Microsoft.EntityFrameworkCore.Design](https://github.com/dotnet/efcore) from 9.0.15 to 9.0.16. <details> <summary>Release notes</summary> _Sourced from [Microsoft.EntityFrameworkCore.Design's releases](https://github.com/dotnet/efcore/releases)._ ## 9.0.16 [Release](https://github.com/dotnet/core/releases/tag/v9.0.16) ## What's Changed * Merging internal commits for release/8.0 by @vseanreesermsft in dotnet/efcore#37900 * [release/9.0] Update dependencies from dotnet/arcade by @dotnet-maestro[bot] in dotnet/efcore#37969 * [release/8.0] Update dependencies from dotnet/arcade by @dotnet-maestro[bot] in dotnet/efcore#38034 * [release/8.0] Update branding to 8.0.27 by @vseanreesermsft in dotnet/efcore#38062 * [release/9.0] Update branding to 9.0.16 by @vseanreesermsft in dotnet/efcore#38063 * [release/9.0] Update dependencies from dotnet/arcade by @dotnet-maestro[bot] in dotnet/efcore#38053 * [automated] Merge branch 'release/8.0' => 'release/9.0' by @github-actions[bot] in dotnet/efcore#37908 * Merging internal commits for release/8.0 by @vseanreesermsft in dotnet/efcore#38099 * [automated] Merge branch 'release/8.0' => 'release/9.0' by @github-actions[bot] in dotnet/efcore#38101 * Merging internal commits for release/9.0 by @vseanreesermsft in dotnet/efcore#38098 * [release/9.0] Update dependencies from dotnet/arcade by @dotnet-maestro[bot] in dotnet/efcore#38170 **Full Changelog**: dotnet/efcore@v9.0.15...v9.0.16 Commits viewable in [compare view](dotnet/efcore@v9.0.15...v9.0.16). </details> Updated [Microsoft.EntityFrameworkCore.InMemory](https://github.com/dotnet/efcore) from 9.0.15 to 9.0.16. <details> <summary>Release notes</summary> _Sourced from [Microsoft.EntityFrameworkCore.InMemory's releases](https://github.com/dotnet/efcore/releases)._ ## 9.0.16 [Release](https://github.com/dotnet/core/releases/tag/v9.0.16) ## What's Changed * Merging internal commits for release/8.0 by @vseanreesermsft in dotnet/efcore#37900 * [release/9.0] Update dependencies from dotnet/arcade by @dotnet-maestro[bot] in dotnet/efcore#37969 * [release/8.0] Update dependencies from dotnet/arcade by @dotnet-maestro[bot] in dotnet/efcore#38034 * [release/8.0] Update branding to 8.0.27 by @vseanreesermsft in dotnet/efcore#38062 * [release/9.0] Update branding to 9.0.16 by @vseanreesermsft in dotnet/efcore#38063 * [release/9.0] Update dependencies from dotnet/arcade by @dotnet-maestro[bot] in dotnet/efcore#38053 * [automated] Merge branch 'release/8.0' => 'release/9.0' by @github-actions[bot] in dotnet/efcore#37908 * Merging internal commits for release/8.0 by @vseanreesermsft in dotnet/efcore#38099 * [automated] Merge branch 'release/8.0' => 'release/9.0' by @github-actions[bot] in dotnet/efcore#38101 * Merging internal commits for release/9.0 by @vseanreesermsft in dotnet/efcore#38098 * [release/9.0] Update dependencies from dotnet/arcade by @dotnet-maestro[bot] in dotnet/efcore#38170 **Full Changelog**: dotnet/efcore@v9.0.15...v9.0.16 Commits viewable in [compare view](dotnet/efcore@v9.0.15...v9.0.16). </details> Updated [Microsoft.EntityFrameworkCore.Relational](https://github.com/dotnet/efcore) from 9.0.15 to 9.0.16. <details> <summary>Release notes</summary> _Sourced from [Microsoft.EntityFrameworkCore.Relational's releases](https://github.com/dotnet/efcore/releases)._ ## 9.0.16 [Release](https://github.com/dotnet/core/releases/tag/v9.0.16) ## What's Changed * Merging internal commits for release/8.0 by @vseanreesermsft in dotnet/efcore#37900 * [release/9.0] Update dependencies from dotnet/arcade by @dotnet-maestro[bot] in dotnet/efcore#37969 * [release/8.0] Update dependencies from dotnet/arcade by @dotnet-maestro[bot] in dotnet/efcore#38034 * [release/8.0] Update branding to 8.0.27 by @vseanreesermsft in dotnet/efcore#38062 * [release/9.0] Update branding to 9.0.16 by @vseanreesermsft in dotnet/efcore#38063 * [release/9.0] Update dependencies from dotnet/arcade by @dotnet-maestro[bot] in dotnet/efcore#38053 * [automated] Merge branch 'release/8.0' => 'release/9.0' by @github-actions[bot] in dotnet/efcore#37908 * Merging internal commits for release/8.0 by @vseanreesermsft in dotnet/efcore#38099 * [automated] Merge branch 'release/8.0' => 'release/9.0' by @github-actions[bot] in dotnet/efcore#38101 * Merging internal commits for release/9.0 by @vseanreesermsft in dotnet/efcore#38098 * [release/9.0] Update dependencies from dotnet/arcade by @dotnet-maestro[bot] in dotnet/efcore#38170 **Full Changelog**: dotnet/efcore@v9.0.15...v9.0.16 Commits viewable in [compare view](dotnet/efcore@v9.0.15...v9.0.16). </details> Updated [Microsoft.Extensions.Caching.Abstractions](https://github.com/dotnet/dotnet) from 10.0.7 to 10.0.8. <details> <summary>Release notes</summary> _Sourced from [Microsoft.Extensions.Caching.Abstractions's releases](https://github.com/dotnet/dotnet/releases)._ No release notes found for this version range. Commits viewable in [compare view](https://github.com/dotnet/dotnet/commits). </details> Updated [Microsoft.Extensions.Configuration](https://github.com/dotnet/dotnet) from 10.0.7 to 10.0.8. <details> <summary>Release notes</summary> _Sourced from [Microsoft.Extensions.Configuration's releases](https://github.com/dotnet/dotnet/releases)._ No release notes found for this version range. Commits viewable in [compare view](https://github.com/dotnet/dotnet/commits). </details> Updated [Microsoft.Extensions.Configuration.Binder](https://github.com/dotnet/dotnet) from 10.0.7 to 10.0.8. <details> <summary>Release notes</summary> _Sourced from [Microsoft.Extensions.Configuration.Binder's releases](https://github.com/dotnet/dotnet/releases)._ No release notes found for this version range. Commits viewable in [compare view](https://github.com/dotnet/dotnet/commits). </details> Updated [Microsoft.Extensions.Hosting](https://github.com/dotnet/dotnet) from 10.0.7 to 10.0.8. <details> <summary>Release notes</summary> _Sourced from [Microsoft.Extensions.Hosting's releases](https://github.com/dotnet/dotnet/releases)._ No release notes found for this version range. Commits viewable in [compare view](https://github.com/dotnet/dotnet/commits). </details> Updated [Microsoft.Extensions.Http](https://github.com/dotnet/dotnet) from 10.0.7 to 10.0.8. <details> <summary>Release notes</summary> _Sourced from [Microsoft.Extensions.Http's releases](https://github.com/dotnet/dotnet/releases)._ No release notes found for this version range. Commits viewable in [compare view](https://github.com/dotnet/dotnet/commits). </details> Updated [Microsoft.Extensions.Options.DataAnnotations](https://github.com/dotnet/dotnet) from 10.0.7 to 10.0.8. <details> <summary>Release notes</summary> _Sourced from [Microsoft.Extensions.Options.DataAnnotations's releases](https://github.com/dotnet/dotnet/releases)._ No release notes found for this version range. Commits viewable in [compare view](https://github.com/dotnet/dotnet/commits). </details> Updated [Selenium.Support](https://github.com/SeleniumHQ/selenium) from 4.43.0 to 4.44.0. <details> <summary>Release notes</summary> _Sourced from [Selenium.Support's releases](https://github.com/SeleniumHQ/selenium/releases)._ ## 4.44.0 ## Detailed Changelogs by Component <img src="https://www.selenium.dev/images/programming/java.svg" width="20" height="20"> **[Java](https://github.com/SeleniumHQ/selenium/blob/trunk/java/CHANGELOG)** | <img src="https://www.selenium.dev/images/programming/python.svg" width="20" height="20"> **[Python](https://github.com/SeleniumHQ/selenium/blob/trunk/py/CHANGES)** | <img src="https://www.selenium.dev/images/programming/dotnet.svg" width="20" height="20"> **[DotNet](https://github.com/SeleniumHQ/selenium/blob/trunk/dotnet/CHANGELOG)** | <img src="https://www.selenium.dev/images/programming/ruby.svg" width="20" height="20"> **[Ruby](https://github.com/SeleniumHQ/selenium/blob/trunk/rb/CHANGES)** | <img src="https://www.selenium.dev/images/programming/javascript.svg" width="20" height="20"> **[JavaScript](https://github.com/SeleniumHQ/selenium/blob/trunk/javascript/selenium-webdriver/CHANGES.md)** <br> <!-- Release notes generated using configuration in .github/release.yml at da2039bd1456a161d0c284de16f9f4f179f1e8ca --> ## What's Changed <details> <summary>Click to see all the changes included in this release</summary> * fix(documentation): update artifact naming for generated docs by @diemol in SeleniumHQ/selenium#17332 * fix(ruby): retrieve devtools version dynamically for package verification by @diemol in SeleniumHQ/selenium#17335 * [dotnet] Don't truncate internal log messages at error/warn levels by @nvborisenko in SeleniumHQ/selenium#17333 * [dotnet] Safe modifications of internal log handlers by @nvborisenko in SeleniumHQ/selenium#17334 * [dotnet] Remove planned obsoleted members for 4.44 by @nvborisenko in SeleniumHQ/selenium#17328 * [dotnet] [bidi] Statically declare commands by @nvborisenko in SeleniumHQ/selenium#17330 * [dotnet] [bidi] Statically declared events by @nvborisenko in SeleniumHQ/selenium#17331 * [dotnet] Add C# 14 extension to polyfill `ArgumentNullException.ThrowIfNull` by @RenderMichael in SeleniumHQ/selenium#16697 * [dotnet] [bidi] Align SetDownloadBehavior command by @nvborisenko in SeleniumHQ/selenium#17336 * [dotnet] [bidi] Align ContinueWithAuth command by @nvborisenko in SeleniumHQ/selenium#17337 * [dotnet] [bidi] Align SetGeolocation polymorphic command by @nvborisenko in SeleniumHQ/selenium#17338 * [dotnet] [test] In-process test webserver by @nvborisenko in SeleniumHQ/selenium#17339 * [java] deprecate the 'native' methods inside the HttpClient interface by @joerg1985 in SeleniumHQ/selenium#17340 * CDDL 2 Python generator by @AutomatedTester in SeleniumHQ/selenium#16914 * Fix py:local_dev rake task by @cgoldberg in SeleniumHQ/selenium#17342 * [grid] Accept legacy session-closed event payloads by @VietND96 in SeleniumHQ/selenium#17343 * [java] specify nullability in package `org.openqa.selenium.remote` by @asolntsev in SeleniumHQ/selenium#17325 * fix NPE when response status is null by @asolntsev in SeleniumHQ/selenium#17348 * [java] fix NoSuchElementException for custom By locators by @Chandan25sharma in SeleniumHQ/selenium#17287 * [py] Update docs with pytest example and minor formatting fixes by @cgoldberg in SeleniumHQ/selenium#17351 * [dotnet] Fix stopping of network monitoring via DevTools by @nvborisenko in SeleniumHQ/selenium#17352 * [dotnet] [test] Update tests to target .NET 10 by @nvborisenko in SeleniumHQ/selenium#17353 * [build] Clean extra tools from GHA runner to free disk space by @cgoldberg in SeleniumHQ/selenium#17360 * Initial Creation of the Selenium CLI Tool by @AutomatedTester in SeleniumHQ/selenium#17327 * [java] fix some nullability warnings by @asolntsev in SeleniumHQ/selenium#17362 * [py] Use generated Bidi files instead of hand curated ones by @AutomatedTester in SeleniumHQ/selenium#17266 * [docs] Add AI-assisted contribution policy by @titusfortner in SeleniumHQ/selenium#17043 * [Agents] Update agents to make sure do linting. by @AutomatedTester in SeleniumHQ/selenium#17366 * [py] Bump dependencies by @cgoldberg in SeleniumHQ/selenium#17368 * [git] update gitignore to exclude mempalace by @AutomatedTester in SeleniumHQ/selenium#17369 * [java] remove field `ChromiumDriver.capabilities` by @asolntsev in SeleniumHQ/selenium#17363 * [spec] Use http_file for the cddl files by @AutomatedTester in SeleniumHQ/selenium#17372 * [dotnet] [bidi] Obsolete Type(string) method in Input module by @nvborisenko in SeleniumHQ/selenium#17377 * Fix Network failures by @AutomatedTester in SeleniumHQ/selenium#17381 * [java] [test] Unignore bidi network conditions tests for Firefox by @nvborisenko in SeleniumHQ/selenium#17385 * [dotnet] [test] Unignore network conditions tests for Firefox by @nvborisenko in SeleniumHQ/selenium#17386 * [dotnet] [test] Migrate to MTP by @nvborisenko in SeleniumHQ/selenium#17384 * [dotnet] Support `UnhandledPromptBehavior` option as string and map (breaking change) by @nvborisenko in SeleniumHQ/selenium#16557 ... (truncated) Commits viewable in [compare view](SeleniumHQ/selenium@selenium-4.43.0...selenium-4.44.0). </details> Updated [Selenium.WebDriver](https://github.com/SeleniumHQ/selenium) from 4.43.0 to 4.44.0. <details> <summary>Release notes</summary> _Sourced from [Selenium.WebDriver's releases](https://github.com/SeleniumHQ/selenium/releases)._ ## 4.44.0 ## Detailed Changelogs by Component <img src="https://www.selenium.dev/images/programming/java.svg" width="20" height="20"> **[Java](https://github.com/SeleniumHQ/selenium/blob/trunk/java/CHANGELOG)** | <img src="https://www.selenium.dev/images/programming/python.svg" width="20" height="20"> **[Python](https://github.com/SeleniumHQ/selenium/blob/trunk/py/CHANGES)** | <img src="https://www.selenium.dev/images/programming/dotnet.svg" width="20" height="20"> **[DotNet](https://github.com/SeleniumHQ/selenium/blob/trunk/dotnet/CHANGELOG)** | <img src="https://www.selenium.dev/images/programming/ruby.svg" width="20" height="20"> **[Ruby](https://github.com/SeleniumHQ/selenium/blob/trunk/rb/CHANGES)** | <img src="https://www.selenium.dev/images/programming/javascript.svg" width="20" height="20"> **[JavaScript](https://github.com/SeleniumHQ/selenium/blob/trunk/javascript/selenium-webdriver/CHANGES.md)** <br> <!-- Release notes generated using configuration in .github/release.yml at da2039bd1456a161d0c284de16f9f4f179f1e8ca --> ## What's Changed <details> <summary>Click to see all the changes included in this release</summary> * fix(documentation): update artifact naming for generated docs by @diemol in SeleniumHQ/selenium#17332 * fix(ruby): retrieve devtools version dynamically for package verification by @diemol in SeleniumHQ/selenium#17335 * [dotnet] Don't truncate internal log messages at error/warn levels by @nvborisenko in SeleniumHQ/selenium#17333 * [dotnet] Safe modifications of internal log handlers by @nvborisenko in SeleniumHQ/selenium#17334 * [dotnet] Remove planned obsoleted members for 4.44 by @nvborisenko in SeleniumHQ/selenium#17328 * [dotnet] [bidi] Statically declare commands by @nvborisenko in SeleniumHQ/selenium#17330 * [dotnet] [bidi] Statically declared events by @nvborisenko in SeleniumHQ/selenium#17331 * [dotnet] Add C# 14 extension to polyfill `ArgumentNullException.ThrowIfNull` by @RenderMichael in SeleniumHQ/selenium#16697 * [dotnet] [bidi] Align SetDownloadBehavior command by @nvborisenko in SeleniumHQ/selenium#17336 * [dotnet] [bidi] Align ContinueWithAuth command by @nvborisenko in SeleniumHQ/selenium#17337 * [dotnet] [bidi] Align SetGeolocation polymorphic command by @nvborisenko in SeleniumHQ/selenium#17338 * [dotnet] [test] In-process test webserver by @nvborisenko in SeleniumHQ/selenium#17339 * [java] deprecate the 'native' methods inside the HttpClient interface by @joerg1985 in SeleniumHQ/selenium#17340 * CDDL 2 Python generator by @AutomatedTester in SeleniumHQ/selenium#16914 * Fix py:local_dev rake task by @cgoldberg in SeleniumHQ/selenium#17342 * [grid] Accept legacy session-closed event payloads by @VietND96 in SeleniumHQ/selenium#17343 * [java] specify nullability in package `org.openqa.selenium.remote` by @asolntsev in SeleniumHQ/selenium#17325 * fix NPE when response status is null by @asolntsev in SeleniumHQ/selenium#17348 * [java] fix NoSuchElementException for custom By locators by @Chandan25sharma in SeleniumHQ/selenium#17287 * [py] Update docs with pytest example and minor formatting fixes by @cgoldberg in SeleniumHQ/selenium#17351 * [dotnet] Fix stopping of network monitoring via DevTools by @nvborisenko in SeleniumHQ/selenium#17352 * [dotnet] [test] Update tests to target .NET 10 by @nvborisenko in SeleniumHQ/selenium#17353 * [build] Clean extra tools from GHA runner to free disk space by @cgoldberg in SeleniumHQ/selenium#17360 * Initial Creation of the Selenium CLI Tool by @AutomatedTester in SeleniumHQ/selenium#17327 * [java] fix some nullability warnings by @asolntsev in SeleniumHQ/selenium#17362 * [py] Use generated Bidi files instead of hand curated ones by @AutomatedTester in SeleniumHQ/selenium#17266 * [docs] Add AI-assisted contribution policy by @titusfortner in SeleniumHQ/selenium#17043 * [Agents] Update agents to make sure do linting. by @AutomatedTester in SeleniumHQ/selenium#17366 * [py] Bump dependencies by @cgoldberg in SeleniumHQ/selenium#17368 * [git] update gitignore to exclude mempalace by @AutomatedTester in SeleniumHQ/selenium#17369 * [java] remove field `ChromiumDriver.capabilities` by @asolntsev in SeleniumHQ/selenium#17363 * [spec] Use http_file for the cddl files by @AutomatedTester in SeleniumHQ/selenium#17372 * [dotnet] [bidi] Obsolete Type(string) method in Input module by @nvborisenko in SeleniumHQ/selenium#17377 * Fix Network failures by @AutomatedTester in SeleniumHQ/selenium#17381 * [java] [test] Unignore bidi network conditions tests for Firefox by @nvborisenko in SeleniumHQ/selenium#17385 * [dotnet] [test] Unignore network conditions tests for Firefox by @nvborisenko in SeleniumHQ/selenium#17386 * [dotnet] [test] Migrate to MTP by @nvborisenko in SeleniumHQ/selenium#17384 * [dotnet] Support `UnhandledPromptBehavior` option as string and map (breaking change) by @nvborisenko in SeleniumHQ/selenium#16557 ... (truncated) Commits viewable in [compare view](SeleniumHQ/selenium@selenium-4.43.0...selenium-4.44.0). </details> Dependabot will resolve any conflicts with this PR as long as you don't alter it yourself. You can also trigger a rebase manually by commenting `@dependabot rebase`. [//]: # (dependabot-automerge-start) [//]: # (dependabot-automerge-end) --- <details> <summary>Dependabot commands and options</summary> <br /> You can trigger Dependabot actions by commenting on this PR: - `@dependabot rebase` will rebase this PR - `@dependabot recreate` will recreate this PR, overwriting any edits that have been made to it - `@dependabot show <dependency name> ignore conditions` will show all of the ignore conditions of the specified dependency - `@dependabot ignore <dependency name> major version` will close this group update PR and stop Dependabot creating any more for the specific dependency's major version (unless you unignore this specific dependency's major version or upgrade to it yourself) - `@dependabot ignore <dependency name> minor version` will close this group update PR and stop Dependabot creating any more for the specific dependency's minor version (unless you unignore this specific dependency's minor version or upgrade to it yourself) - `@dependabot ignore <dependency name>` will close this group update PR and stop Dependabot creating any more for the specific dependency (unless you unignore this specific dependency or upgrade to it yourself) - `@dependabot unignore <dependency name>` will remove all of the ignore conditions of the specified dependency - `@dependabot unignore <dependency name> <ignore condition>` will remove the ignore condition of the specified dependency and ignore conditions </details> Signed-off-by: dependabot[bot] <support@github.com> Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
Commands declaration without allocation.
🔗 Related Issues
Contributes to #16095
💥 What does this PR do?
This pull request refactors the BiDi (Bi-Directional) WebDriver command execution pipeline to simplify command handling, improve type safety, and streamline serialization logic. The main changes include replacing the generic
ExecuteCommandAsyncmethod with a more type-safeExecuteAsyncmethod, centralizing command definitions, and cleaning up command class structure. Additionally, the handling of pending commands and serialization is improved for reliability and maintainability.Refactoring of command execution and handling:
ExecuteCommandAsyncmethod with a more type-safeExecuteAsyncmethod inBroker.cs, which now uses aCommand<TParameters, TResult>descriptor and parameters, improving clarity and reducing boilerplate. (dotnet/src/webdriver/BiDi/Broker.cs, [1] [2] [3] [4]TryRemoveinstead ofTryGetValue, ensuring commands are removed as soon as they are processed, preventing potential memory leaks or double-removal. (dotnet/src/webdriver/BiDi/Broker.cs, [1] [2] [3]Centralization and simplification of command definitions:
CloseCommand,CreateUserContextCommand) and replaced them with static command descriptors inBrowserModule.cs, reducing duplication and centralizing command logic. (dotnet/src/webdriver/BiDi/Browser/BrowserModule.cs, [1];dotnet/src/webdriver/BiDi/Browser/Close.cs, [2];dotnet/src/webdriver/BiDi/Browser/CreateUserContext.cs, [3];dotnet/src/webdriver/BiDi/Browser/GetUserContexts.cs, [4];dotnet/src/webdriver/BiDi/Browser/GetClientWindows.cs, [5];dotnet/src/webdriver/BiDi/Browser/RemoveUserContext.cs, [6];dotnet/src/webdriver/BiDi/Browser/SetDownloadBehavior.cs, [7];dotnet/src/webdriver/BiDi/BrowsingContext/Activate.cs, [8]Module and visibility adjustments:
public sealedtointernal sealedto restrict their visibility and clarify their intended usage within the assembly. (dotnet/src/webdriver/BiDi/Browser/BrowserModule.cs, [1];dotnet/src/webdriver/BiDi/BrowsingContext/BrowsingContextInputModule.cs, [2];dotnet/src/webdriver/BiDi/BrowsingContext/BrowsingContextLogModule.cs, [3]These changes collectively improve maintainability, type safety, and the overall structure of the BiDi WebDriver implementation.
🔄 Types of changes