A Registration implements lifestyle based caching for a single service and allows building an
Expression that describes the creation of the service.
Inheritance Hierarchy
SimpleInjectorRegistration
Namespace: SimpleInjector
Assembly: SimpleInjector (in SimpleInjector.dll) Version: 5.3.0
Syntax
The Registration type exposes the following members.
Constructors
Name | Description | |
---|---|---|
Registration |
Initializes a new instance of the Registration class.
|
Properties
Name | Description | |
---|---|---|
Container | Gets the Container instance for this registration. | |
ImplementationType | Gets the type that this instance will create. | |
Lifestyle | Gets the Lifestyle this that created this registration. | |
SuppressDisposal |
Gets or sets a value indicating whether the disposal of created instances for this registration
should be suppressed or not. The default is false. Having a value of false, does not force an
instance to be disposed of, though; Transient instances, for instance, will never be disposed of.
|
Methods
Name | Description | |
---|---|---|
BuildExpression |
Builds a new Expression with the correct caching (according to the specifications of
its Lifestyle) applied.
| |
BuildTransientDelegate |
Builds a FuncTResult delegate for the creation of the ImplementationType.
The returned FuncTResult might be intercepted by a
Container.ExpressionBuilding event,
and initializers (if any) (RegisterInitializerTService(ActionTService))
will be applied.
| |
BuildTransientExpression |
Builds an Expression that describes the creation of ImplementationType.
The returned Expression might be intercepted by a
Container.ExpressionBuilding event,
and initializers (if any) (RegisterInitializer(ActionInstanceInitializationData, PredicateInitializerContext)) can be
applied.
| |
GetRelationships |
Gets the list of KnownRelationship instances. Note that the list is only available
after calling BuildExpression.
| |
InitializeInstance |
Initializes an already created instance and applies properties and initializers to that instance.
| |
SuppressDiagnosticWarning |
Suppressing the supplied DiagnosticType for the given registration.
|
Remarks
Examples
See Also