[Feature]: Add parameter builder pattern to operation methods in DurableContext #544
zhongkechen
started this conversation in
Ideas
Replies: 0 comments
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
What would you like?
Currently all methods in DurableContext is overloaded to cover the mostly used combinations of these parameters, but we couldn't cover all use cases as the number of methods would increase exponentially.
A solution to avoid overload explosion is to use parameter builder pattern, e.g.
All the combinations of these parameters (excluding optional resultType as a choice) would need 16 distinct overloaded methods (plus another 16 for async variants). Now we have covered only 8 of them in code..
Possible Implementation
No response
Is this a breaking change?
No
Does this require an RFC?
No
Additional Context
No response
All reactions