Table of Contents

Class AsyncActionStrategy<TIn>.Builder.WhenBuilder

Namespace
PatternKit.Behavioral.Strategy
Assembly
PatternKit.Core.dll

Intermediate builder returned by When(Predicate) allowing a corresponding handler to be set.

public sealed class AsyncActionStrategy<TIn>.Builder.WhenBuilder
Inheritance
AsyncActionStrategy<TIn>.Builder.WhenBuilder
Inherited Members

Methods

Then(Handler)

Assigns the handler to execute when the associated predicate evaluates to true.

public AsyncActionStrategy<TIn>.Builder Then(AsyncActionStrategy<TIn>.Handler handler)

Parameters

handler AsyncActionStrategy<TIn>.Handler

The asynchronous handler for this branch.

Returns

AsyncActionStrategy<TIn>.Builder

The parent AsyncActionStrategy<TIn>.Builder for further configuration.

Then(Action<TIn>)

Assigns a synchronous handler to execute when the associated predicate evaluates to true.

public AsyncActionStrategy<TIn>.Builder Then(Action<TIn> syncHandler)

Parameters

syncHandler Action<TIn>

A synchronous handler; wrapped as async.

Returns

AsyncActionStrategy<TIn>.Builder

The parent AsyncActionStrategy<TIn>.Builder for further configuration.