I am new to IoC and especially castle windsor. Can someone explain to me the differences between part1 and part2? My understanding is part1 is where you register components and part2 is a factory where it creates object. I am not sure what component means in this context. I read some of the documentation http://docs.castleproject.org/ but cannot seem to find where it explains these 2 in detail.
container.Register
(
//part1
AllTypes.FromAssemblyContaining<AnotherClass>()
.BasedOn<ISomething>()
.WithService.DefaultInterfaces()
.WithService.Self(),
//part2
Component.For<ISomething>().ImplementedBy<Something>()
);