IndexOutOfRange exception in Orchard.Layouts
I have an overridden driver in my project to suppress another, which is fine. However this seems to cause an issue when using the new Orchard.Layouts. The problem is in
where it is assumed that the parent of the driver will have a generic parameter with the same name as the part.
return _contentPartDrivers.Where(x => x.GetType().BaseType.GenericTypeArguments.Name == partName);
Could we change this to something more flexible?
return _contentPartDrivers.Where(x => x.GetType().GetInterfaces().Any(t => t.IsGenericType && t.GenericTypeArguments.Name == partName));