Class AsyncActionDecorator<TIn>.Builder
- Namespace
- PatternKit.Structural.Decorator
- Assembly
- PatternKit.Core.dll
Fluent builder for AsyncActionDecorator<TIn>.
public sealed class AsyncActionDecorator<TIn>.Builder
- Inheritance
-
AsyncActionDecorator<TIn>.Builder
- Inherited Members
Methods
After(AfterAction)
Adds an async decorator that executes logic after the next layer completes.
public AsyncActionDecorator<TIn>.Builder After(AsyncActionDecorator<TIn>.AfterAction action)
Parameters
actionAsyncActionDecorator<TIn>.AfterAction
Returns
After(Action<TIn>)
Adds a sync decorator that executes logic after the next layer completes.
public AsyncActionDecorator<TIn>.Builder After(Action<TIn> action)
Parameters
actionAction<TIn>
Returns
Around(AroundTransform)
Adds an async decorator that wraps the entire execution with custom logic.
public AsyncActionDecorator<TIn>.Builder Around(AsyncActionDecorator<TIn>.AroundTransform transform)
Parameters
transformAsyncActionDecorator<TIn>.AroundTransform
Returns
Before(BeforeTransform)
Adds an async decorator that transforms input before it reaches the next layer.
public AsyncActionDecorator<TIn>.Builder Before(AsyncActionDecorator<TIn>.BeforeTransform transform)
Parameters
transformAsyncActionDecorator<TIn>.BeforeTransform
Returns
Before(Func<TIn, TIn>)
Adds a sync decorator that transforms input before it reaches the next layer.
public AsyncActionDecorator<TIn>.Builder Before(Func<TIn, TIn> transform)
Parameters
transformFunc<TIn, TIn>
Returns
Build()
Builds an immutable async action decorator with the registered decorators.
public AsyncActionDecorator<TIn> Build()
Returns
- AsyncActionDecorator<TIn>