Class OfTypeDefinition<T>

Assembly: redb.Route.dll

Typed scope-opener that converts the exchange body to T
(via ) and then runs the contained child outputs
with the body strongly typed as T. Apache Camel parity:
.OfType<T>() equivalent of choice().when(body().isInstanceOf(T.class))
combined with a transparent unmarshal step.

public class OfTypeDefinition<T> : RouteDefinitionBase<OfTypeDefinition<T>>, IRouteDefinition, IProcessorDefinition

Inheritance

Implements

Inherited Members

Methods

CreateProcessor(IRouteContext)

Compile this node into a runtime processor.

public override IProcessor CreateProcessor(IRouteContext context)

Filter(Func<T, bool>)

Typed inline Filter: keep only exchanges whose body matches the typed predicate.

public OfTypeFilterDefinition<T> Filter(Func<T, bool> predicate)

Process(Action<T>)

Typed Process: invoked with the body cast to T.

public OfTypeDefinition<T> Process(Action<T> action)

Transform(Func<T, object?>)

Typed Transform: receives the body as T and assigns the result back.

public OfTypeDefinition<T> Transform(Func<T, object?> transform)