to answer my own question, I've fixed this issue with:
.FilterByExactTypes(new List<Type>() { typeof(myPageType) })
I also figured out that you need to convert everything to types that "DelegateFilterBuilder" understands, but my attempt didn't work so I changed it too the above:
Expression<Func<BaseRenderedPage, Filter>> filterExpression = x => x.GetType().ToString().Match(typeof(myPageType).ToString()); // this didn't work
I'm using EPiServer Find to fetch all child pages, and I'm trying to make re-usable method which at it's heart is a Linq statement calling Find. Part of the linq is a "filter" method, which I'd like to be able to pass in. Currently, my method compiles but I cant correctly formulate something to pass into it.
The parameter giving me problems:
so i have a method that accepts the above filterExpression, but I've found no way of creating a value for that using types not already supported by the Episerverr Filters, in this instance I'd like to filter by type, but cant find a way to create a new filter to support new types of data. I've tried to use 'DelegateFilterBuilder' but again, new types dont seam to work
The heart of my resuable method I'm trying to create looks like this:
Part of my problem is EPiServer.Find.Api.Querying.Filter is an abstract class with nothing but static methods (according to resharper decompile),
What am i missing? Is there some easy c# syntactic sugar I can use to solve my problem?
Using EPiServer CMS 11
Using EPiServer Find 13