IoC (Windsor) - What is the "default interface"?

Can someone explain the difference between

container.Register(AllTypes.FromAssemblyContaining(typeof(BigCompanyRepository))
 .WithService.DefaultInterface()

and

container.Register(AllTypes.FromAssemblyContaining(typeof(BigCompanyRepository))
 .WithService.AllInterfaces()

What is meant by default interface?

+5
source share
1 answer

This is a heuristic that searches for an implementation of an interface by removing the leadingI :

  • IFoo → Foo
  • IBar → Bar
  • IKitchenSink → KitchenSink

However, in my opinion, using this function smells like a redundant 1: 1 interface .

+6
source

All Articles