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

Updating Lambda Invoke to support byref values. #253

Closed

Conversation

holdenmai
Copy link
Contributor

Implementation to resolve #252.

This needs to be completed prior to #250 since it depends on this logic to work in order to test some of the edge cases with combining variable/parameter setting in the Add methods.

Usage

var a = 1;

var parameters = new[]{
	new Parameter(nameof(a), typeof(int).MakeByRefType())
};

var lambda = target.Parse("2 + (a = a + 3)", parameters);
var args = new object[] { a };
var result = lambda.Invoke(args);
Assert.AreEqual(2 + (a + 3), result);
a += 3;
Assert.AreEqual(a, args[0]);

@davideicardi
Copy link
Member

Closing this for now. Write me if you think this is still relevant ...

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.

Lambda Invoke does not update arguments in the parameters array
2 participants