Fixes TypeFinder to not scan for types when the assembly IsDynamic (created using reflection Emit).
This fixes the RenderRouteHandlerTests which were failing due to a sequence of events when the new PetaPoco classes were created using Reflection and then the TypeFinder tries to enumerate on them.
This commit is contained in:
@@ -407,6 +407,10 @@ namespace Umbraco.Core
|
||||
|
||||
private static IEnumerable<Type> GetTypesWithFormattedException(Assembly a)
|
||||
{
|
||||
//if the assembly is dynamic, do not try to scan it
|
||||
if (a.IsDynamic)
|
||||
return Enumerable.Empty<Type>();
|
||||
|
||||
try
|
||||
{
|
||||
return a.GetExportedTypes();
|
||||
|
||||
Reference in New Issue
Block a user