ContainerRegisterCollection Method

Simple Injector
Overload List

  NameDescription
Public methodRegisterCollectionTService(IEnumerableAssembly)
Registers all concrete, non-generic types (both public and internal) that are defined in the given set of assemblies and that implement the given TService with a default lifestyle and register them as a collection of TService. Unless overridden using a custom LifestyleSelectionBehavior, the default lifestyle is Transient.
Public methodRegisterCollectionTService(IEnumerableType)
Registers a collection of serviceTypes, whose instances will be resolved lazily each time the resolved collection of TService is enumerated. The underlying collection is a stream that will return individual instances based on their specific registered lifestyle, for each call to Current. The order in which the types appear in the collection is the exact same order that the items were registered, i.e the resolved collection is deterministic.
Public methodRegisterCollectionTService(IEnumerableTService)
Registers a dynamic (container uncontrolled) collection of elements of type TService. A call to GetAllInstancesTService will return the containerUncontrolledCollection itself, and updates to the collection will be reflected in the result. If updates are allowed, make sure the collection can be iterated safely if you're running a multi-threaded application.
Public methodRegisterCollectionTService(TService)
Registers a collection of singleton elements of type TService.
Public methodRegisterCollectionTService(IEnumerableRegistration)
Registers a collection of registrations, whose instances will be resolved lazily each time the resolved collection of TService is enumerated. The underlying collection is a stream that will return individual instances based on their specific registered lifestyle, for each call to Current. The order in which the types appear in the collection is the exact same order that the items were registered, i.e the resolved collection is deterministic.
Public methodRegisterCollection(Type, IEnumerableRegistration)
Registers a collection of registrations, whose instances will be resolved lazily each time the resolved collection of serviceType is enumerated. The underlying collection is a stream that will return individual instances based on their specific registered lifestyle, for each call to Current. The order in which the types appear in the collection is the exact same order that the items were registered, i.e the resolved collection is deterministic.
Public methodRegisterCollection(Type, IEnumerableAssembly)
Registers all concrete, non-generic types (both public and internal) that are defined in the given set of assemblies and that implement the given serviceType with a default lifestyle and register them as a collection of serviceType. Unless overridden using a custom LifestyleSelectionBehavior, the default lifestyle is Transient. Composites, decorators and generic type definitions will be excluded from registration.
Public methodRegisterCollection(Type, IEnumerableType)
Registers a collection of serviceTypes, whose instances will be resolved lazily each time the resolved collection of serviceType is enumerated. The underlying collection is a stream that will return individual instances based on their specific registered lifestyle, for each call to Current. The order in which the types appear in the collection is the exact same order that the items were registered, i.e the resolved collection is deterministic.
Public methodRegisterCollection(Type, IEnumerable)
Registers a dynamic (container uncontrolled) collection of elements of type serviceType. A call to GetAllInstancesTService will return the containerUncontrolledCollection itself, and updates to the collection will be reflected in the result. If updates are allowed, make sure the collection can be iterated safely if you're running a multi-threaded application.
Public methodRegisterCollection(Type, Assembly)
Registers all concrete, non-generic types (both public and internal) that are defined in the given set of assemblies and that implement the given serviceType with a default lifestyle and register them as a collection of serviceType. Unless overridden using a custom LifestyleSelectionBehavior, the default lifestyle is Transient. Composites, decorators and generic type definitions will be excluded from registration.
Top
See Also

Reference