[dotnet] [bidi] Support cancellation of events registration#16996
[dotnet] [bidi] Support cancellation of events registration#16996nvborisenko merged 6 commits intoSeleniumHQ:trunkfrom
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
This enhancement allows consumers of the API to cancel pending event subscriptions and unsubscriptions, improving responsiveness and resource management in scenarios where operations may need to be aborted.
🔗 Related Issues
Continuation of #16989
💥 What does this PR do?
CancellationTokenparameter to all event subscription methods inBrowsingContextModule, including navigation, history, download, context, and user prompt events, allowing callers to cancel subscriptions if needed.🔄 Types of changes
PR Type
Enhancement
Description
Add
CancellationTokenparameter to all BiDi event subscription methodsEnable cancellation of pending event subscriptions across modules
Support cancellation in
SubscribeAsyncandUnsubscribeAsyncoperationsPropagate cancellation tokens through broker and module layers
Diagram Walkthrough
File Walkthrough
11 files
Add cancellation token to subscribe and unsubscribe methodsPropagate cancellation token through subscription methodsAdd cancellation token to UnsubscribeAsync methodAdd cancellation tokens to all navigation and context eventsAdd cancellation token to file dialog event subscriptionsAdd cancellation token to log entry event subscriptionsAdd cancellation tokens to network event subscriptionsAdd cancellation tokens to network event subscription methodsAdd cancellation token to file dialog event subscriptionsAdd cancellation token to log entry event subscriptionsAdd cancellation tokens to script event subscription methods