Repository navigation
Use TaskConverter from Activout.RestClient - #58
Conversation
Replaces ITaskConverter and TaskConverter3<T> with the delegate-based TaskConverter from Activout.RestClient. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
|
Warning Review limit reachedYou've used all free OSS reviews for now. Wait for the free limit to reset to keep reviewing this public repository. Next included review available in 29 minutes. View limit detailsLimit details: You’ve used the included review currently available. Review configuration: ⚙️ Run configuration
📒 Files selected for processing (4)
Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out. Comment |
# Conflicts: # Activout.DatabaseClient/Implementation/MethodHandler.cs
There was a problem hiding this comment.
🟢 Approval recommended
The refactoring preserves covered asynchronous behavior while simplifying converter construction.
0 open findings
What changed in this PR
Replaces reflection-instantiated task converter classes with a delegate-based converter copied from Activout.RestClient.
Changes:
- Adds
TaskConverter.Createusing a bound generic delegate. - Updates
MethodHandlerto invoke the converter delegate. - Removes the obsolete converter interface and implementation.
| File | Description |
|---|---|
Activout.DatabaseClient/ITaskConverter.cs |
Removes the obsolete interface. |
Activout.DatabaseClient/Implementation/TaskConverter3.cs |
Removes the generic converter class. |
Activout.DatabaseClient/Implementation/TaskConverter.cs |
Adds delegate-based task conversion. |
Activout.DatabaseClient/Implementation/MethodHandler.cs |
Uses the new converter delegate. |
🧠 Review effort: Balanced
💡 Add a code-review agent skill or configure MCP servers for context-aware, tailored reviews. Learn more in the docs.
Replaces
ITaskConverterandTaskConverter3<T>withTaskConverterfrom Activout.RestClient (Activout.RestClient/Implementation/TaskConverter.csonmain), copied with only the namespace changed.TaskConverter.Create(resultType)returns aFunc<Task<object?>, object>bound to a genericConvert<T>through delegate return type covariance. That removes the interface, the generic class, and theActivator.CreateInstancecall inMethodHandler.Tested:
dotnet test(19 passed).🤖 Generated with Claude Code