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
transformAsyncDecorator<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
transformFunc<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
transformAsyncDecorator<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
transformAsyncDecorator<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
transformFunc<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>