I have a list of lambda-expressions List<Func<SomeObject, bool>> filterList;
This filterlist is using to filter a collection of SomeObject
easily like this:
List<SomeObject> randomList; //filled with random stuff
foreach (Func<SomeObject, bool> filter in filterlist)
randomList = randomList.Where(filter).ToList();
Now I want to combine some filters - but I want to combine them with AND- or OR-Statements. As example: The user has 3 filter A,B and C and want to combine them to something like "A && (B || C).
I have no idea howto do this.