Click or drag to resize

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
public enum PipelinePhase
  Member nameValueDescription
ResolveRequestStart0 The start of a resolve request. Custom middleware added to this phase executes before circular dependency detection.
ScopeSelection10 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).
Decoration75 In this phase, instance decoration will take place (on the way 'out' of the pipeline).
Sharing100 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.
ServicePipelineEnd150 This phase occurs just before the service pipeline ends (and the registration pipeline is about to start).
RegistrationPipelineStart200 This phase occurs at the start of the registration pipeline.
ParameterSelection250 This phase runs just before Activation, is the recommended point at which the resolve parameters should be replaced (using ChangeParameters(IEnumerableParameter)).
Activation300 The Activation phase is the last phase of a pipeline, where a new instance of a component is created.
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