We used to iterate over DataSourceRequest filters like this:
foreach (var filter in request.Filters)
{
var descriptor = filter as FilterDescriptor;
if (descriptor != null)
{
//do stuff
}
}
Since we moved to Q3(v2013.2.906) this simple solution no longer works. With 2 or more filters applied to datasource, requestFilter is single CompositeFilterDescriptor with 2 children, CompositeFilterDescriptor and FilterDescriptor, and so long.
Is this a feature or a bug? If this is a feature is there any elegant solution to 'do stuff' or turn it off and get back to good old FilterDescriptor collection?
Right now we're using crude recursion to preprocess the filters, but that does not feel quite right. ;-)
foreach (var filter in request.Filters)
{
var descriptor = filter as FilterDescriptor;
if (descriptor != null)
{
//do stuff
}
}
Since we moved to Q3(v2013.2.906) this simple solution no longer works. With 2 or more filters applied to datasource, requestFilter is single CompositeFilterDescriptor with 2 children, CompositeFilterDescriptor and FilterDescriptor, and so long.
Is this a feature or a bug? If this is a feature is there any elegant solution to 'do stuff' or turn it off and get back to good old FilterDescriptor collection?
Right now we're using crude recursion to preprocess the filters, but that does not feel quite right. ;-)