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.
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.
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.
Thrown by the container in case of a diagnostic error.
Contains contextual information about the direct consumer for which the given dependency is injected into.
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.
Extension methods for working with packages.
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 open generic 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 applications.
Extension methods for integrating Simple Injector with ASP.NET Core MVC applications.
Extension methods for integrating Simple Injector with ASP.NET MVC applications.
Extension methods for integrating Simple Injector with WCF services.
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.
Factory for the creation of a delegate that applies caching to the supplied transientInstanceCreator.
This enumeration has defines in which way the container should run the verification process.