Closed xxyuze closed 10 months ago
Why do you want to dramatically slow down the script performance by using LINQ interop where simple Array.map
would suffice?
The above is just an example to show that although Jint already supports LINQ operations, it seems incomplete. #304 Sometimes you need to operate on .NET objects, and you must use LINQ operations.
In addition, GroupBy will also report the same error.
var engine = new Engine(cfg => cfg
.AllowClr()
.AddExtensionMethods(typeof(System.Linq.Enumerable))
);
;
someDotnetList.GroupBy(m => ({a:m,b:m})).ToArray();
Would you like to help out with a fix PR including missing test coverage for the cases you've found?
Version used
3.0.0-beta-2057
Describe the bug
I can use linq to select a value, but I can't select an object.
The error message "Object must implement IConvertible"
To Reproduce
Ideally code samples or better yet, xUnit test against current
main
.Expected behavior
A clear and concise description of what you expected to happen.
Additional context
Add any other context about the problem here.