Table of Contents

Class ValidatorProducerBehavior

Namespace
Silverback.Messaging.Validation
Assembly
Silverback.Integration.dll

Validates the message being produced.

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

Constructors

ValidatorProducerBehavior(ISilverbackLogger<ValidatorProducerBehavior>)

Initializes a new instance of the ValidatorProducerBehavior class.

public ValidatorProducerBehavior(ISilverbackLogger<ValidatorProducerBehavior> logger)

Parameters

logger ISilverbackLogger<ValidatorProducerBehavior>

The ISilverbackLogger<TCategoryName>.

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.