-
-
Notifications
You must be signed in to change notification settings - Fork 231
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
UriKind is not recognized in Uri constructor #442
Comments
Hello @zspitz. A small remark: you always use the However this class does not exists in this repository, it should be I think you are mistaken by another source code repository? |
@StefH I don't think so; it's right here: https://github.com/zzzprojects/System.Linq.Dynamic.Core/blob/master/src/System.Linq.Dynamic.Core/Parser/ExpressionParser.cs . And AFAICT,
I've just checked now -- every method in |
You are correct. However I think the DynamicExpressionParser is a more public class, and the ExpressionParser is more internal. That's why I was confused. |
Hello @zspitz, As a workaround you can use the integer value from the enum: or Use parameter: var selector = "Uri(\"https://www.example.com/\", @0)";
var prm = Expression.Parameter(typeof(Uri));
var parser = new ExpressionParser(new[] { prm }, selector, new object[] { UriKind.Absolute }, ParsingConfig.Default);
var expr = parser.Parse(null); I'll investigate further on the details on this issue. |
Solved by #450 |
System.Uri is a predefined type.
The following:
fails with:
UriKind
appears to be understood as a member ofPerson
, and not as an enum value.This is especially puzzling, because the following selector:
is parsed just fine.
Could it be because there is a string literal within the first selector?
The text was updated successfully, but these errors were encountered: