Repository navigation
[dotnet] [bidi] Refactor CommandInfo and EventInfo to structs - #17080
Conversation
PR TypeEnhancement Description
|
| Relevant files | |||
|---|---|---|---|
| Enhancement |
|
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:
|
|||||||||
There was a problem hiding this comment.
Pull request overview
Refactors the internal BiDi Broker bookkeeping types to reduce allocations and simplify the representation of pending commands/events by using record struct values instead of tuples/classes.
Changes:
- Replaced the pending event tuple channel with a strongly-typed
EventInforecord struct channel. - Replaced
CommandInforeference type with areadonly record struct, removing the redundant stored command id (dictionary key already provides it). - Updated enqueue/dequeue logic to use the new struct types.
Improve performance for commands/events internally.
💥 What does this PR do?
This pull request refactors the internal event and command handling logic in the
Brokerclass to simplify data structures and improve type safety. The main changes involve replacing tuple-based and class-based representations withrecord structtypes for commands and events, and updating related logic accordingly.🔄 Types of changes