What’s the difference between these two?
Component.For<IMyType>()
.LifeStyle
.PerWebRequest
.UsingFactoryMethod(() => new MyType());
and
Component.For<IMyType>()
.UsingFactoryMethod(() => new MyType())
.LifeStyle
.Is(LifestyleType.PerWebRequest);
They are the same. The only difference is that the API has been simplified (made less verbose, more direct). You can simplify it even further with Windsor 3:
Hope this helps!