ContainerRegister Method

Simple Injector
Overload List

  NameDescription
Public methodRegisterTConcrete
Registers that a new instance of TConcrete will be returned every time it is requested (transient).
Public methodRegisterTService, TImplementation
Registers that a new instance of TImplementation will be returned every time a TService is requested (transient).
Public methodRegisterTService(FuncTService)
Registers the specified delegate that allows returning transient instances of TService. The delegate is expected to always return a new instance on each call.
Public methodRegister(Type)
Registers that a new instance of concreteType will be returned every time it is requested (transient).
Public methodRegisterTConcrete(Lifestyle)
Registers that an instance of TConcrete will be returned when it is requested. The instance is cached according to the supplied lifestyle.
Public methodRegisterTService, TImplementation(Lifestyle)
Registers that an instance of TImplementation will be returned when an instance of type TService is requested. The instance is cached according to the supplied lifestyle.
Public methodRegisterTService(FuncTService, Lifestyle)
Registers the specified delegate instanceCreator that will produce instances of type TService and will be returned when an instance of type TService is requested. The delegate is expected to produce new instances on each call. The instances are cached according to the supplied lifestyle.
Public methodRegister(Type, IEnumerableAssembly)
Registers all concrete, non-generic, public and internal types in the given set of assemblies that implement the given openGenericServiceType with container's default lifestyle (which is transient by default). Decorators and generic type definitions will be excluded from registration, while composites are included.
Public methodRegister(Type, IEnumerableType)
Registers all supplied implementationTypes based on the closed-generic version of the given openGenericServiceType with the transient lifestyle.
Public methodRegister(Type, FuncObject)
Registers the specified delegate that allows returning instances of serviceType.
Public methodRegister(Type, Assembly)
Registers all concrete, non-generic, public and internal types in the given set of assemblies that implement the given openGenericServiceType with container's default lifestyle (which is transient by default). Decorators and generic type definitions will be excluded from registration, while composites are included.
Public methodRegister(Type, Type)
Registers that a new instance of implementationType will be returned every time a serviceType is requested. If serviceType and implementationType represent the same type, the type is registered by itself. Open and closed generic types are supported.
Public methodRegister(Type, IEnumerableAssembly, Lifestyle)
Registers all concrete, non-generic, public and internal types in the given set of assemblies that implement the given openGenericServiceType with the supplied lifestyle. Decorators and generic type definitions will be excluded from registration, while composites are included.
Public methodRegister(Type, IEnumerableType, Lifestyle)
Registers all supplied implementationTypes based on the closed-generic version of the given openGenericServiceType with the given lifestyle.
Public methodRegister(Type, FuncObject, Lifestyle)
Registers the specified delegate instanceCreator that will produce instances of type serviceType and will be returned when an instance of type serviceType is requested. The delegate is expected to produce new instances on each call. The instances are cached according to the supplied lifestyle.
Public methodRegister(Type, Assembly, Lifestyle)
Registers all concrete, non-generic, public and internal types in the given assembly that implement the given openGenericServiceType with the supplied lifestyle. Decorators and generic type definitions will be excluded from registration, while composites are included.
Public methodRegister(Type, Type, Lifestyle)
Registers that an instance of type implementationType will be returned when an instance of type serviceType is requested. The instance is cached according to the supplied lifestyle. Open and closed generic types are supported.
Top
See Also

Reference