-
Notifications
You must be signed in to change notification settings - Fork 21
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
Adds missing support for lexicographical comparison for numeric operators #15
Conversation
@yavuztor the build is failing with the following error message "Error signing output with
I had the same issue on my local dev machine and resolved it by removing this link in the |
@sarensw , it took me a while to get to this, sorry for that. When I added the strong naming, I added the private key, which has caused the build failure you have experienced. I pushed the change that fixes the issue. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The fix is good, but needs some reorganization.
var allText = values.All(a => a.Type == JTokenType.String); | ||
if (allText) | ||
{ | ||
var valuesText = args.Select(a => a == null ? "" : p.Apply(a, data).ToString()).ToArray(); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
the values are already generated. There is no need to re-apply the evaluations. You can use the values like var textValues = values.Cast<strirng>().ToArray();
|
||
// all values text? | ||
var allText = values.All(a => a.Type == JTokenType.String); | ||
if (allText) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
With this change, this method handles two cases: text and double. We can extract each of those cases into a method and then simplify this method to something like:
return allText ? CheckCriteria(values.Cast<string>()) : CheckCriteria(values.Cast<double>());
Closing this because of inactivity. |
This pull request adds missing support for lexicographical comparison for numeric operators. Operators supported are <, >, <=, >=.
This is especially useful for comparison of dates, for example.
Fixes #14