|
|
|
@ -56,13 +56,17 @@ namespace DS.Module.Core.Condition
|
|
|
|
|
switch (item.Operator)
|
|
|
|
|
{
|
|
|
|
|
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":
|
|
|
|
|
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":
|
|
|
|
|
itemResult = valStr?.Contains(item.Value, StringComparison.OrdinalIgnoreCase) == true; break;
|
|
|
|
|
case "not_contain":
|
|
|
|
|
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":
|
|
|
|
|
itemResult = valStr?.StartsWith(item.Value, StringComparison.OrdinalIgnoreCase) == true; break;
|
|
|
|
|
case "end_with":
|
|
|
|
|