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

CSharp.Context.Execute(string) should return BoxedValue, not object #83

Open
axefrog opened this issue Jul 19, 2011 · 1 comment
Open

Comments

@axefrog
Copy link

axefrog commented Jul 19, 2011

The return value from a script could be any valid JavaScript value and these are most easily expressed and examined using the BoxedValue type. Rather than having to run through a big set of if/else statements checking the return type in order to determine how to treat the value, it would make more sense to return a BoxedValue object which has the appropriate properties and methods to do this efficiently.

@otac0n
Copy link
Collaborator

otac0n commented Jul 19, 2011

We have to return object, in order to support dynamic interop.

The easiest thing to do is just use dynamic a = Execute(...); and do your thing with the a variable.

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

No branches or pull requests

2 participants