Table of Contents

Class AsyncDecorator<TIn, TOut>.Builder

Namespace
PatternKit.Structural.Decorator
Assembly
PatternKit.Core.dll

Fluent builder for AsyncDecorator<TIn, TOut>.

public sealed class AsyncDecorator<TIn, TOut>.Builder
Inheritance
AsyncDecorator<TIn, TOut>.Builder
Inherited Members

Methods

After(AfterTransform)

Adds an async decorator that transforms output after it returns from the next layer.

public AsyncDecorator<TIn, TOut>.Builder After(AsyncDecorator<TIn, TOut>.AfterTransform transform)

Parameters

transform AsyncDecorator<TIn, TOut>.AfterTransform

Returns

AsyncDecorator<TIn, TOut>.Builder

After(Func<TIn, TOut, TOut>)

Adds a sync decorator that transforms output after it returns from the next layer.

public AsyncDecorator<TIn, TOut>.Builder After(Func<TIn, TOut, TOut> transform)

Parameters

transform Func<TIn, TOut, TOut>

Returns

AsyncDecorator<TIn, TOut>.Builder

Around(AroundTransform)

Adds an async decorator that wraps the entire execution with custom logic.

public AsyncDecorator<TIn, TOut>.Builder Around(AsyncDecorator<TIn, TOut>.AroundTransform transform)

Parameters

transform AsyncDecorator<TIn, TOut>.AroundTransform

Returns

AsyncDecorator<TIn, TOut>.Builder

Before(BeforeTransform)

Adds an async decorator that transforms input before it reaches the next layer.

public AsyncDecorator<TIn, TOut>.Builder Before(AsyncDecorator<TIn, TOut>.BeforeTransform transform)

Parameters

transform AsyncDecorator<TIn, TOut>.BeforeTransform

Returns

AsyncDecorator<TIn, TOut>.Builder

Before(Func<TIn, TIn>)

Adds a sync decorator that transforms input before it reaches the next layer.

public AsyncDecorator<TIn, TOut>.Builder Before(Func<TIn, TIn> transform)

Parameters

transform Func<TIn, TIn>

Returns

AsyncDecorator<TIn, TOut>.Builder

Build()

Builds an immutable async decorator with the registered decorators.

public AsyncDecorator<TIn, TOut> Build()

Returns

AsyncDecorator<TIn, TOut>