PipelinePhase Enumeration |
Defines the possibles phases of the resolve pipeline.
Namespace:
Autofac.Core.Resolving.Pipeline
Assembly:
Autofac (in Autofac.dll) Version: 6.0.0+39696a967e8826f7f1ebc8c1ff4523c9dd75abe0
Syntax public enum PipelinePhase
Public Enumeration PipelinePhase
Members
| Member name | Value | Description |
---|
| ResolveRequestStart | 0 |
The start of a resolve request. Custom middleware added to this phase executes before circular dependency detection.
|
| ScopeSelection | 10 |
In this phase, the lifetime scope selection takes place. If some middleware needs to change the lifetime scope for resolving against,
it happens here (but bear in mind that the configured Autofac lifetime for the registration will take effect).
|
| Decoration | 75 |
In this phase, instance decoration will take place (on the way 'out' of the pipeline).
|
| Sharing | 100 |
At the end of this phase, if a shared instance satisfies the request, the pipeline will stop executing and exit. Add custom
middleware to this phase to choose your own shared instance.
|
| ServicePipelineEnd | 150 |
This phase occurs just before the service pipeline ends (and the registration pipeline is about to start).
|
| RegistrationPipelineStart | 200 |
This phase occurs at the start of the registration pipeline.
|
| ParameterSelection | 250 |
This phase runs just before Activation, is the recommended point at which the resolve parameters should be replaced
(using ChangeParameters(IEnumerableParameter)).
|
| Activation | 300 |
The Activation phase is the last phase of a pipeline, where a new instance of a component is created.
|
Remarks
A resolve pipeline is split into these distinct phases, that control general ordering
of middlewares and allow integrations and consuming code to specify what point in the pipeline to run their middleware.
As a general principle, order between phases is strict, and always executes in the same order, but order within a phase should
not be important for most cases, and handlers should be able to run in any order.
See Also