-
-
Notifications
You must be signed in to change notification settings - Fork 227
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Update ComparisonOperator logic to support comparing to object (#805)
* TryConvertTypes(ref left, ref right); * ConvertObjectToSupportComparison * ConvertObjectToSupportComparison * .
- Loading branch information
Showing
6 changed files
with
187 additions
and
29 deletions.
There are no files selected for viewing
16 changes: 16 additions & 0 deletions
16
src/System.Linq.Dynamic.Core/Extensions/TokenIdExtensions.cs
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,16 @@ | ||
using System.Linq.Dynamic.Core.Tokenizer; | ||
|
||
namespace System.Linq.Dynamic.Core.Extensions; | ||
|
||
internal static class TokenIdExtensions | ||
{ | ||
internal static bool IsEqualityOperator(this TokenId tokenId) | ||
{ | ||
return tokenId is TokenId.Equal or TokenId.DoubleEqual or TokenId.ExclamationEqual or TokenId.LessGreater; | ||
} | ||
|
||
internal static bool IsComparisonOperator(this TokenId tokenId) | ||
{ | ||
return tokenId is TokenId.Equal or TokenId.DoubleEqual or TokenId.ExclamationEqual or TokenId.LessGreater or TokenId.GreaterThan or TokenId.GreaterThanEqual or TokenId.LessThan or TokenId.LessThanEqual; | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.