|
|
@ -56,13 +56,17 @@ namespace DS.Module.Core.Condition
|
|
|
|
switch (item.Operator)
|
|
|
|
switch (item.Operator)
|
|
|
|
{
|
|
|
|
{
|
|
|
|
case "equal":
|
|
|
|
case "equal":
|
|
|
|
itemResult = valStr?.Equals(item.Value, StringComparison.OrdinalIgnoreCase) == true; break;
|
|
|
|
itemResult = (valStr == null && item.Value == null) || valStr?.Equals(item.Value, StringComparison.OrdinalIgnoreCase) == true; break;
|
|
|
|
case "not_equal":
|
|
|
|
case "not_equal":
|
|
|
|
itemResult = valStr?.Equals(item.Value, StringComparison.OrdinalIgnoreCase) != true; break;
|
|
|
|
itemResult = (valStr != null || item.Value != null) && valStr?.Equals(item.Value, StringComparison.OrdinalIgnoreCase) != true; break;
|
|
|
|
case "contains":
|
|
|
|
case "contains":
|
|
|
|
itemResult = valStr?.Contains(item.Value, StringComparison.OrdinalIgnoreCase) == true; break;
|
|
|
|
itemResult = valStr?.Contains(item.Value, StringComparison.OrdinalIgnoreCase) == true; break;
|
|
|
|
case "not_contain":
|
|
|
|
case "not_contain":
|
|
|
|
itemResult = valStr?.Contains(item.Value, StringComparison.OrdinalIgnoreCase) != true; break;
|
|
|
|
itemResult = valStr?.Contains(item.Value, StringComparison.OrdinalIgnoreCase) != true; break;
|
|
|
|
|
|
|
|
case "empty":
|
|
|
|
|
|
|
|
itemResult = string.IsNullOrWhiteSpace(valStr) == true; break;
|
|
|
|
|
|
|
|
case "not_empty":
|
|
|
|
|
|
|
|
itemResult = string.IsNullOrWhiteSpace(valStr) != true; break;
|
|
|
|
case "start_with":
|
|
|
|
case "start_with":
|
|
|
|
itemResult = valStr?.StartsWith(item.Value, StringComparison.OrdinalIgnoreCase) == true; break;
|
|
|
|
itemResult = valStr?.StartsWith(item.Value, StringComparison.OrdinalIgnoreCase) == true; break;
|
|
|
|
case "end_with":
|
|
|
|
case "end_with":
|
|
|
|