Skip to content
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

Consider adding BuildObservable overload that returns typed sequence #1915

Closed
glopesdev opened this issue Jul 15, 2024 · 0 comments · Fixed by #1942
Closed

Consider adding BuildObservable overload that returns typed sequence #1915

glopesdev opened this issue Jul 15, 2024 · 0 comments · Fixed by #1942
Labels
proposal Request for a new feature
Milestone

Comments

@glopesdev
Copy link
Member

glopesdev commented Jul 15, 2024

Several aspects of building and running workflows from code remain cumbersome. One of them is getting the result of compiled observable sequences, which currently has to be done by calling Build to get the workflow expression tree, and then assembling and calling a lambda to finally generate the typed sequence.

BuildObservable provides a wrapper to take care of this boilerplate code, but it currently assumes the type of the result sequence is always Unit by inserting a UnitBuilder at the end, which disregards any actual output value from the workflow.

Both for testing and other applications where the type of the workflow is either known or expected, we could provide a generic overload allowing for explicit indication of the type of the observable sequence returned by the workflow. This overload would test if the output sequence is compatible with the provided type, and if so, build and compile a final observable with the specified type.

@glopesdev glopesdev added the proposal Request for a new feature label Jul 15, 2024
@glopesdev glopesdev added this to the 2.9 milestone Jul 15, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
proposal Request for a new feature
Projects
None yet
Development

Successfully merging a pull request may close this issue.

1 participant