Castle Windsor Fluent API: Define dependency explicitly
Given the below configuration Container.Register(Component.For<A>().Named("foo")); Container.Register(Component.For<B>().Named("foobar")); Container.Register( AllTypes.Pick() .FromAssemblyNamed("MyAssembly") .If(t => t.Name.EndsWith("ABC")) .Configure(c => c.LifeStyle.Is(LifestyleType.Transient)) .WithService.Select(i => typeof(I)) ); Container.Register( AllTypes.Pick() .FromAssemblyNamed("MyAssembly") .If(t => t.Name.EndsWith("123")) .Configure(c => c.LifeStyle.Is(LifestyleType.Transient)) .WithService.Select(i => typeof(I)) ); If I know that the interface "I" exposes a property "P", and that