Skip to content

Commit 95ee889

Browse files
committed
Add Configure method on CompositionRootBuilder
1 parent 436e12f commit 95ee889

File tree

1 file changed

+5
-1
lines changed

1 file changed

+5
-1
lines changed

CompositionRoot/CompositionRootBuilder.cs

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,4 @@
1+
using System;
12
using Autofac;
23
using Autofac.Core;
34

@@ -15,8 +16,11 @@ public CompositionRootBuilder RegisterModule<T>()
1516
}
1617

1718
public CompositionRootBuilder RegisterModule(IModule module)
19+
=> Configure(builder => builder.RegisterModule(module));
20+
21+
public CompositionRootBuilder Configure(Action<ContainerBuilder> configureAction)
1822
{
19-
_builder.RegisterModule(module);
23+
configureAction(_builder);
2024
return this;
2125
}
2226

0 commit comments

Comments
 (0)