-
-
Notifications
You must be signed in to change notification settings - Fork 8.6k
[dotnet] [bidi] Encapsulate transport inside Broker
#15423
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
Conversation
PR Reviewer Guide 🔍Here are some key observations to aid the review process:
|
PR Code Suggestions ✨Explore these optional code suggestions:
|
||||||||||||||
|
User description
Description
Encapsulate transport inside
BrokerMotivation and Context
Better encapsulation, works towards custom BiDi modules, such as #15329
Types of changes
Checklist
PR Type
Enhancement
Description
Encapsulated the transport mechanism within the
Brokerclass.Replaced direct
ITransportusage withWebSocketTransportinstantiation inBroker.Introduced
DisposeAsyncCorefor better disposal pattern adherence.Simplified
BiDiinitialization by removing direct transport dependency.Changes walkthrough 📝
BiDi.cs
Refactored `BiDi` to encapsulate transport dependencydotnet/src/webdriver/BiDi/BiDi.cs
ITransportinBiDi.DisposeAsyncto useDisposeAsyncCoreand suppressfinalization.
Brokerinitialization by passingUriinstead ofITransport.Broker.cs
Refactored `Broker` to manage transport internallydotnet/src/webdriver/BiDi/Communication/Broker.cs
BrokerusingWebSocketTransport.DisposeAsyncCorefor structured disposal of resources.ITransportduringBrokerinitialization.