mirror of
https://github.com/Biarity/Sieve.git
synced 2024-11-22 05:22:57 +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>();
|
||||
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));
|
||||
}
|
||||
}
|
||||
return value;
|
||||
}
|
||||
else
|
||||
|
Loading…
Reference in New Issue
Block a user