You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
[Fact]
public void BuildCallbacksInvokedWhenRegisteredInModuleLoad()
{
var module = new BuildCallbackModule();
var builder = new ContainerBuilder();
builder.RegisterModule(module);
builder.Build();
Assert.Equal(2, module.Called);
}
public class BuildCallbackModule : Module
{
public int Called { get; private set; }
protected override void Load(ContainerBuilder builder)
{
void BuildCallback(IContainer c)
{
Called++;
}
builder.RegisterBuildCallback(BuildCallback)
.RegisterBuildCallback(BuildCallback);
}
}
The text was updated successfully, but these errors were encountered:
This issue is present in Autofac 4.5.
The text was updated successfully, but these errors were encountered: