[go: up one dir, main page]

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

Support custom grain call return types #8415

Merged

Conversation

ReubenBond
Copy link
Member
@ReubenBond ReubenBond commented May 2, 2023

This PR adds support for extending the set of supported grain return types.

This allows us to support calling patterns beyond request-response. For example, IAsyncEnumerable<T>.
A subsequent PR will add initial support for returning IAsyncEnumerable<T> from grains, based on this functionality.

To use this, a developer would start by annotating a request base type with [ReturnValueProxy(initializerMethodName)]. Doing so prevents the code generator from relying on .NET's AsyncMethodBuilder to create the instances of the return type and instead allows the value returned from the method with the name specified by initializerMethodName to provide that value.

Microsoft Reviewers: Open in CodeFlow

@ReubenBond ReubenBond merged commit c511a42 into dotnet:main May 5, 2023
@ReubenBond ReubenBond deleted the feature/extensible-grain-call-return-types branch May 5, 2023 17:07
@github-actions github-actions bot locked and limited conversation to collaborators Dec 2, 2023
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant