The SimpleInjector namespace contains the core types to use when working with the library.
The standard exception thrown when a container has an error in resolving an object.
Extension methods for IConstructorResolutionBehavior.
The container. Create an instance of this type for registration of dependencies.
Contains methods for registering and creating collections in the Container.
Configuration options for the Container.
The scope that manages the lifetime of singletons and other container-controlled instances.
An instance of this type can be injected into constructors of decorator classes that are registered using RegisterDecorator. This type contains contextual information about the applied decoration and it allows users to examine the given instance to make runtime decisions.
An instance of this type will be supplied to the PredicateT delegate that is that is supplied to the RegisterDecorator overload that takes this delegate. This type contains information about the decoration that is about to be applied and it allows users to examine the given instance to see whether the decorator should be applied or not.
Extension methods for IDependencyInjectionBehavior.
Provides access to an injected dependency and its metadata.
Thrown by the container in case of a diagnostic error.
Contextual information the a dependency and its direct consumer for which the dependency is injected into. The consumer's type is given by the ImplementationType property, where the Target property gives access to the consumer's target element (property or constructor argument) in which the dependency will be injected, and the dependency's type information.
Discovers the attributes of the code element (a property or parameter) where a dependency will be injected into, and provides access to its meta data.
Instances returned from the container can be cached. The Container contains several overloads of the Register method that take a Lifestyle instance as argument to define how returned instances should be cached. The core library contains two lifestyles out of the box. By supplying Lifestyle.Transient, the registered instance is not cached; a new instance is returned every time it is requested or injected. By supplying Lifestyle.Singleton instances can be cached indefinitely; only a single instance of the registered component will be returned by that container instance. Other lifestyles are defined in integration and extension packages. The CreateCustom method allows defining a custom lifestyle and the CreateHybrid method allows creating a lifestyle that mixes multiple other lifestyles.
An instance of this type will be supplied to the PredicateT delegate that is that is supplied to the RegisterConditional overload that takes this delegate. This type contains information about the service that is about to be created and it allows the user to examine the given instance to decide whether this implementation should be created or not.
A Registration implements lifestyle based caching for a single service and allows building an Expression that describes the creation of the service.
Implements a cache for ScopedLifestyle implementations.
Base class for scoped lifestyles. A scoped lifestyle caches instances for the duration of an implicitly or explicitly defined scope. Such scope can be an (implicitly defined) web request or an explicitly defined Lifetime Scope. The lifetime of instances registered with a scoped lifestyle is always equal or bigger than one-instance-per-object-graph. In other words, a call to GetInstance() will never create more than one instance of such registered type.
Extension methods for integrating Simple Injector with ASP.NET Web API applications.
Contains contextual information for creating an implementation type.
Useful extensions on Type.
Defines options to control the types returned from the GetTypesToRegister method. For a type to be returned, it should match all the conditions described by the class's properties. In other words, in case the searched assembly contains a generic type, that is both a decorator and a composite, it will only be returned by GetTypesToRegister in case both IncludeGenericTypeDefinitions, IncludeDecorators and IncludeComposites are set to true.
Provides data for and interaction with the ResolveUnregisteredType event of the Container. An observer can check the UnregisteredServiceType to see whether the unregistered type can be handled. The Register(FuncObject) method can be called to register a FuncTResult delegate that allows creation of instances of the unregistered for this and future requests.
Visualization options for providing various information about instances.
Factory for the creation of a delegate that applies caching to the supplied transientInstanceCreator.
This enumeration defines in which way the container should run the verification process.