mirror of
https://github.com/Biarity/Sieve.git
synced 2024-11-22 13:32:33 +01:00
OR filtering tests - multiple properties (#8)
This commit is contained in:
parent
b041c0baff
commit
3e671f56ad
@ -26,9 +26,21 @@ namespace Sieve.Models
|
|||||||
{
|
{
|
||||||
var value = new List<IFilterTerm>();
|
var value = new List<IFilterTerm>();
|
||||||
foreach (var filter in Filters.Split(','))
|
foreach (var filter in Filters.Split(','))
|
||||||
|
{
|
||||||
|
if (filter.StartsWith("("))
|
||||||
|
{
|
||||||
|
var filterOpAndVal = filter.Substring(filter.LastIndexOf(")") + 1);
|
||||||
|
filter = filter.Replace(subfilterOpAndVal, "").Replace("(", "").Replace(")","");
|
||||||
|
foreach (var subfilter in filter.Split("|"))
|
||||||
|
{
|
||||||
|
value.Add(new FilterTerm(subfilter + filterOpAndVal))
|
||||||
|
}
|
||||||
|
}
|
||||||
|
else
|
||||||
{
|
{
|
||||||
value.Add(new FilterTerm(filter));
|
value.Add(new FilterTerm(filter));
|
||||||
}
|
}
|
||||||
|
}
|
||||||
return value;
|
return value;
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
|
Loading…
Reference in New Issue
Block a user