Table of Contents

Class ProducerPipelineContext

Namespace
Silverback.Messaging.Broker.Behaviors
Assembly
Silverback.Integration.dll

The context that is passed along the producer behaviors pipeline.

public class ProducerPipelineContext
Inheritance
ProducerPipelineContext
Derived
Inherited Members

Constructors

ProducerPipelineContext(IOutboundEnvelope, IProducer, IReadOnlyList<IProducerBehavior>, ProducerBehaviorHandler, IServiceProvider)

Initializes a new instance of the ProducerPipelineContext class.

public ProducerPipelineContext(IOutboundEnvelope envelope, IProducer producer, IReadOnlyList<IProducerBehavior> pipeline, ProducerBehaviorHandler finalAction, IServiceProvider serviceProvider)

Parameters

envelope IOutboundEnvelope

The envelope containing the message to be produced.

producer IProducer

The IProducer that triggered this pipeline.

pipeline IReadOnlyList<IProducerBehavior>

The behaviors composing the pipeline.

finalAction ProducerBehaviorHandler

The final action to be executed after the pipeline has been processed.

serviceProvider IServiceProvider

The IServiceProvider to be used to resolve the required services.

Properties

CurrentStepIndex

Gets the index of the current step in the pipeline.

public int CurrentStepIndex { get; }

Property Value

int

Envelope

Gets or sets the envelope containing the message to be produced.

public IOutboundEnvelope Envelope { get; set; }

Property Value

IOutboundEnvelope

FinalAction

Gets the final action to be executed after the pipeline has been processed.

public ProducerBehaviorHandler FinalAction { get; }

Property Value

ProducerBehaviorHandler

Pipeline

Gets the behaviors composing the pipeline.

public IReadOnlyList<IProducerBehavior> Pipeline { get; }

Property Value

IReadOnlyList<IProducerBehavior>

Producer

Gets the IProducer that triggered this pipeline.

public IProducer Producer { get; }

Property Value

IProducer

ServiceProvider

Gets or sets the IServiceProvider to be used to resolve the required services.

public IServiceProvider ServiceProvider { get; set; }

Property Value

IServiceProvider

Methods

Clone(IOutboundEnvelope?)

Clones the current context, optionally replacing the envelope.

public virtual ProducerPipelineContext Clone(IOutboundEnvelope? newEnvelope = null)

Parameters

newEnvelope IOutboundEnvelope

The new envelope to be used in the cloned context.

Returns

ProducerPipelineContext

The cloned context.