We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
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
as
is
System.Type
The following:
class Foo { } class Bar : Foo { } var prm = Parameter(typeof(Foo)); var selector = $"as(@0)"; var parser = new ExpressionParser(new[] { prm }, selector, new object[] { typeof(Bar) }, ParsingConfig.Default); var expr = parser.Parse(null);
fails with:
System.Linq.Dynamic.Core.Exceptions.ParseException: 'The 'as' function requires one argument which is not null.'
The same happens with is:
var selector = $"is(@0)";
It might be helpful to clarify the error by explaining that the one argument must be the FullName of the type.
FullName
But I suggest it be possible to accept a System.Type, and FullName should be read from the type.
The text was updated successfully, but these errors were encountered:
I've updated the code to support also Type for As, Is, OfType and Cast.
However, it needs to be a constant value (note that your example works fine with the code fix)
Sorry, something went wrong.
However, it needs to be a constant value
In other words, if I have a property or method which returns a Type, it's not going to work?
Correct, that will not yet work.
No branches or pull requests
The following:
fails with:
The same happens with
is
:It might be helpful to clarify the error by explaining that the one argument must be the
FullName
of the type.But I suggest it be possible to accept a
System.Type
, andFullName
should be read from the type.The text was updated successfully, but these errors were encountered: