concept only some component in category dependency injection

appears as: only some components
Dependency Injection

This is an excerpt from Manning's book Dependency Injection.

Autofac natively understands sequences; unless you need to explicitly pick only some components from all services of a given type, Autofac automatically does the right thing. Auto-Wiring works not only with single instances, but also for sequences, and the container maps a sequence to all configured instances of the corresponding type. A perhaps less intuitive use of having multiple instances of the same Abstraction is the Decorators design pattern, which we’ll discuss next.

Simple Injector automatically handles sequences, and unless you specify otherwise, it does what you’d expect it to do: it resolves a sequence of Dependencies for all registrations of that Abstraction. Only when you need to explicitly pick only some components from a larger set do you need to do more. Let’s see how you can do that.

Dependency Injection in .NET

This is an excerpt from Manning's book Dependency Injection in .NET.

Spring.NET automatically handles arrays, and, with a little help from ArrayEnumerable<T>, it also handles other requests for sequences by resolving them to sequences of objects that implement the requested type. The only thing you need is to configure an ArrayEnumerable of the appropriate item type. Only when you need to explicitly pick only some components from a larger set do you need to do more than that. This is possible with more explicit configuration.

Autofac automatically handles sequences, and unless we specify otherwise, it does what we’d expect it to do: it resolves a sequence of DEPENDENCIES to all registered components of that type. Only when we need to explicitly pick only some components from a larger set do we need to do more. Let’s see how we can do that.