I have part of a code that has dependencies that look as follows:
public class MyPage : Page //ASPX WebForms page
{
public IPersonBl PersonBl { get; set; }
}
public class PersonBl : IPersonBl
{
public PersonBl(ISomeMagicBl magicBl){...}
}
public class SomeMagicBl : ISomeMagicBl
{
public IPersonBl PersonBl { get; set; }
public SomeMagicBl(/*Other dependencies*/) {...}
}
My module configuration looks as follows
...
builder.RegisterAssemblyTypes(ThisAssembly).Where(t => t.Name.EndsWith("BL")).AsImplementedInterfaces().PropertiesAutowired(PropertyWiringFlags.AllowCircularDependencies).InstancePerLifetimeScope();
...
As can be seen, I have circular dependencies in my classes which I was able to resolve by using the ..PropertiesAutowired(PropertyWiringFlags.AllowCircularDependencies)..
.
My Question: What exactly does this flag do behind the scenes to solve these circular dependencies??