Skip to content

Commit 80476ed

Browse files
committed
Removed eager materialization of inspection types for binding
1 parent 29a5ac4 commit 80476ed

File tree

1 file changed

+6
-2
lines changed

1 file changed

+6
-2
lines changed

RetailCoder.VBE/Root/RubberduckModule.cs

Lines changed: 6 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -294,8 +294,12 @@ private void ApplyAbstractFactoryConvention(IEnumerable<Assembly> assemblies)
294294
private void BindCodeInspectionTypes(IEnumerable<Assembly> assemblies)
295295
{
296296
var inspections = assemblies
297-
.SelectMany(a => a.GetTypes().Where(type => type.IsClass && !type.IsAbstract && type.GetInterfaces().Contains(typeof(IInspection))))
298-
.ToList();
297+
.SelectMany(a => a.GetTypes()
298+
.Where(type => type.IsClass
299+
&& !type.IsAbstract
300+
&& type.GetInterfaces().Contains(typeof(IInspection))
301+
)
302+
);
299303

300304
// multibinding for IEnumerable<IInspection> dependency
301305
foreach(var inspection in inspections)

0 commit comments

Comments
 (0)