This is no different from writing:
builder.RegisterType<A>().As<IA>();
builder.RegisterType<B>().As<IB>();
builder.RegisterType<C>().As<IC>();
Surrounding something with curly braces creates a different context, for example:
int a = 1;
{
int b = 2;
}
In your case, the function does not return anything, and therefore the context does not matter much.
source
share