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

Dynamic Function Result #55

Open
wants to merge 1 commit into
base: develop
Choose a base branch
from

Conversation

campersau
Copy link
Contributor

@campersau campersau commented Dec 30, 2021

Adds support for invoking a function with a dynamic return type. Values are read on demand and can not be accessed once the function gets disposed. Which means that this feature in its current state is not supported by SapPooledConnection.

See #36 (comment) for more usage details.


public override bool TryInvokeMember(InvokeMemberBinder binder, object[] args, out object result)
{
if (binder.Name == "GetMetadata" && binder.CallInfo.ArgumentCount == 0)
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

With this code GetMetadata can be called on the results to get the current metadata. Not sure if we should expose it like this or just hide it.

var result = fn.Invoke<dynamic>();

result.GetMetadata();
result.MY_STRUCT.GetMetadata();
result.MY_TABLE.GetMetadata();
result.MY_TABLE[0].GetMetadata();

@phillipc
Copy link

phillipc commented Aug 5, 2022

Good work, nice feature. Can we push and publish it?

@campersau campersau mentioned this pull request Aug 5, 2022
@campersau campersau marked this pull request as ready for review August 30, 2022 19:00
@campersau
Copy link
Contributor Author

Rebased and ready for review. SapPooledConnection is now supported because of #68

@phoeeohp
Copy link

Thank you very much for your current version of dynamicrfc. Can the incoming parameters also be dynamically modified? @campersau

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants