Class ValidateProcessor

Assembly: redb.Route.dll

Pipeline processor that validates the exchange using an .

By default, a failed validation sets the ValidationErrors property on the exchange
and throws a . If is false,
the processor only sets the property without throwing — giving the developer freedom to handle
errors downstream via .Choice() or .Filter().

public sealed class ValidateProcessor : IProcessor

Inheritance

Object→ValidateProcessor

Implements

Properties

ThrowOnFailure

Whether to throw on failure.

public bool ThrowOnFailure { get; }

Methods

Process(IExchange, CancellationToken)

Processes the exchange asynchronously.

public Task Process(IExchange exchange, CancellationToken ct = default)

Constructors

ValidateProcessor(IMessageValidator, bool)

Creates a validate processor that wraps the specified validator.