-
-
Notifications
You must be signed in to change notification settings - Fork 8.3k
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
[dotnet] [bidi] Avoid polymorphic commands to be more statically easier #15202
[dotnet] [bidi] Avoid polymorphic commands to be more statically easier #15202
Conversation
PR Reviewer Guide 🔍Here are some key observations to aid the review process:
|
PR Code Suggestions ✨Explore these optional code suggestions:
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Nice!
User description
Simplify declaration of commands.
Motivation and Context
Improves AOT.
Types of changes
Checklist
PR Type
Enhancement
Description
Refactored
Command
class to remove polymorphism and simplify structure.Updated BiDi modules to use generic
ExecuteCommandAsync
for better type safety.Added explicit
method
parameter to all command classes for improved serialization.Enhanced JSON serialization context to include all command types explicitly.
Changes walkthrough 📝
15 files
Refactored `ExecuteCommandAsync` to use generics.
Removed polymorphic attributes and added `method` parameter.
Updated JSON serialization context to include all commands.
Updated `SendAsJsonAsync` to use generics.
Refactored `SendAsJsonAsync` to handle generic command types.
Updated `ExecuteCommandAsync` calls to use generics.
Added explicit `method` parameter to `CloseCommand`.
Added explicit `method` parameter to `CreateUserContextCommand`.
Added explicit `method` parameter to `GetUserContextsCommand`.
Added explicit `method` parameter to `RemoveUserContextCommand`.
Updated `ExecuteCommandAsync` calls to use generics.
Added explicit `method` parameter to `CreateCommand`.
Updated `ExecuteCommandAsync` calls to use generics.
Updated `ExecuteCommandAsync` calls to use generics.
Updated `ExecuteCommandAsync` calls to use generics.
36 files