Table of Contents

Class OutboundSpyBrokerBehavior

Namespace
Silverback.Testing
Assembly
Silverback.Integration.Testing.dll

Added at the very beginning of the producer pipeline, forwards the published IOutboundEnvelope to the IIntegrationSpy.

public class OutboundSpyBrokerBehavior : IProducerBehavior, IBrokerBehavior, ISorted
Inheritance
OutboundSpyBrokerBehavior
Implements
Inherited Members

Constructors

OutboundSpyBrokerBehavior(IntegrationSpy)

Initializes a new instance of the OutboundSpyBrokerBehavior class.

public OutboundSpyBrokerBehavior(IntegrationSpy integrationSpy)

Parameters

integrationSpy IntegrationSpy

The IntegrationSpy.

Properties

SortIndex

Gets the sort index.

public int SortIndex { get; }

Property Value

int

Methods

HandleAsync(ProducerPipelineContext, ProducerBehaviorHandler, CancellationToken)

Process, handles or transforms the message being produced.

public ValueTask HandleAsync(ProducerPipelineContext context, ProducerBehaviorHandler next, CancellationToken cancellationToken)

Parameters

context ProducerPipelineContext

The context that is passed along the behaviors pipeline.

next ProducerBehaviorHandler

The next behavior in the pipeline.

cancellationToken CancellationToken

The cancellation token that can be used to cancel the operation.

Returns

ValueTask

A ValueTask representing the asynchronous operation.