zzzprojects / Eval-Expression.NET

C# Eval Expression | Evaluate, Compile, and Execute C# code and expression at runtime.
https://eval-expression.net/
Other
459 stars 86 forks source link

Bug: generic list full name #7

Closed vzsoft closed 7 years ago

vzsoft commented 7 years ago

hi

use: error System.Collections.Generic.List<System.Collections.Generic.List use: not error System.Collections.Generic.List<List>

sample:


            var context = new EvalContext();
            context.RegisterType(typeof(System.Collections.Generic.List<>));
            context.RegisterType(typeof(string));

            //Not Error
            var xx2 = context.Compile<Func<System.Collections.Generic.List<System.String>, object>>(@"
                var lst = new System.Collections.Generic.List<List<System.String>>();
                return lst;", "reader");

            //Error
            var xx = context.Compile<Func<System.Collections.Generic.List<System.String>, object>>(@"
                var lst = new System.Collections.Generic.List<System.Collections.Generic.List<System.String>>();
                return lst;", "reader");
JonathanMagnan commented 7 years ago

Hello @vzsoft ,

Thank you for reporting.

We have started to investigate the issue. We hope to complete tomorrow or later this week.

Best Regards,

Jonathan

JonathanMagnan commented 7 years ago

Hello @vzsoft ,

The v2.1.1 has been released.

We have fixed issue with namespace when used in a generic type.

Let me know if that's now working.

Best Regards,

Jonathan

vzsoft commented 7 years ago

Thank you