Table of Contents

Struct ThenChain<T>

Namespace
TinyBDD
Assembly
TinyBDD.dll

Represents a chain of Then assertions that can be further extended with And/But and awaited to execute the recorded scenario.

public readonly struct ThenChain<T>

Type Parameters

T

The value type produced by the preceding step and carried through assertions.

Inherited Members
Extension Methods

Examples

var ctx = Bdd.CreateContext(this);
await Bdd.Given(ctx, "start", () => 2)
          .When("double", x => x * 2)
          .Then(">= 4", v => v >= 4)  // returns ThenChain<int>
          .And("!= 5", v => v != 5);  // add another assertion, then await

Remarks

TinyBDD defers execution: steps are queued until you await the chain. Calling any of the And/But methods only records additional steps; the actual execution happens when the chain is awaited.

Methods

And(Action<T>)

Adds a And assertion with a default title using a synchronous action.

public ThenChain<T> And(Action<T> assertion)

Parameters

assertion Action<T>

Asynchronous assertion that receives the carried value.

Returns

ThenChain<T>

A ThenChain<T> for further chaining.

And(Func<Task>)

Adds a And assertion with a default title (no value parameter).

public ThenChain<T> And(Func<Task> assertion)

Parameters

assertion Func<Task>

Asynchronous assertion.

Returns

ThenChain<T>

A ThenChain<T> for further chaining.

And(Func<T, bool>)

Adds an And boolean assertion with a default title

public ThenChain<T> And(Func<T, bool> predicate)

Parameters

predicate Func<T, bool>

Predicate evaluated against the carried value.

Returns

ThenChain<T>

A ThenChain<T> for further chaining.

And(Func<T, CancellationToken, Task<bool>>)

Adds an And boolean assertion with a default title observing a token.

public ThenChain<T> And(Func<T, CancellationToken, Task<bool>> predicate)

Parameters

predicate Func<T, CancellationToken, Task<bool>>

Predicate evaluated against the carried value.

Returns

ThenChain<T>

A ThenChain<T> for further chaining.

And(Func<T, CancellationToken, Task>)

Adds an And assertion with a default title observing a token.

public ThenChain<T> And(Func<T, CancellationToken, Task> assertion)

Parameters

assertion Func<T, CancellationToken, Task>

Asynchronous assertion that receives the carried value.

Returns

ThenChain<T>

A ThenChain<T> for further chaining.

And(Func<T, CancellationToken, ValueTask<bool>>)

Adds an And boolean assertion with a default title observing a token.

public ThenChain<T> And(Func<T, CancellationToken, ValueTask<bool>> predicate)

Parameters

predicate Func<T, CancellationToken, ValueTask<bool>>

Predicate evaluated against the carried value.

Returns

ThenChain<T>

A ThenChain<T> for further chaining.

And(Func<T, CancellationToken, ValueTask>)

Adds an And assertion with a default title observing a token.

public ThenChain<T> And(Func<T, CancellationToken, ValueTask> assertion)

Parameters

assertion Func<T, CancellationToken, ValueTask>

Asynchronous assertion that receives the carried value.

Returns

ThenChain<T>

A ThenChain<T> for further chaining.

And(Func<T, Task<bool>>)

Adds an And boolean assertion with a default title

public ThenChain<T> And(Func<T, Task<bool>> predicate)

Parameters

predicate Func<T, Task<bool>>

Predicate evaluated against the carried value.

Returns

ThenChain<T>

A ThenChain<T> for further chaining.

And(Func<T, Task>)

Adds an And assertion with a default title

public ThenChain<T> And(Func<T, Task> assertion)

Parameters

assertion Func<T, Task>

Asynchronous assertion that receives the carried value.

Returns

ThenChain<T>

A ThenChain<T> for further chaining.

And(Func<T, ValueTask<bool>>)

Adds an And boolean assertion with a default title

public ThenChain<T> And(Func<T, ValueTask<bool>> predicate)

Parameters

predicate Func<T, ValueTask<bool>>

Predicate evaluated against the carried value.

Returns

ThenChain<T>

A ThenChain<T> for further chaining.

And(Func<T, ValueTask>)

Adds an And assertion with a default title

public ThenChain<T> And(Func<T, ValueTask> assertion)

Parameters

assertion Func<T, ValueTask>

Asynchronous assertion that receives the carried value.

Returns

ThenChain<T>

A ThenChain<T> for further chaining.

And(string, Action<T>)

Adds a And assertion with an explicit title using a synchronous action.

public ThenChain<T> And(string title, Action<T> assertion)

Parameters

title string

Display title for the assertion.

assertion Action<T>

Asynchronous assertion that receives the carried value.

Returns

ThenChain<T>

A ThenChain<T> for further chaining.

And(string, Func<Task>)

Adds a And assertion with an explicit title (no value parameter).

public ThenChain<T> And(string title, Func<Task> assertion)

Parameters

title string

Display title for the assertion.

assertion Func<Task>

Asynchronous assertion.

Returns

ThenChain<T>

A ThenChain<T> for further chaining.

And(string, Func<T, bool>)

Adds an And boolean assertion with an explicit title

public ThenChain<T> And(string title, Func<T, bool> predicate)

Parameters

title string

Display title for the assertion.

predicate Func<T, bool>

Predicate evaluated against the carried value.

Returns

ThenChain<T>

A ThenChain<T> for further chaining.

And(string, Func<T, CancellationToken, Task<bool>>)

Adds an And boolean assertion with an explicit title observing a token.

public ThenChain<T> And(string title, Func<T, CancellationToken, Task<bool>> predicate)

Parameters

title string

Display title for the assertion.

predicate Func<T, CancellationToken, Task<bool>>

Predicate evaluated against the carried value.

Returns

ThenChain<T>

A ThenChain<T> for further chaining.

And(string, Func<T, CancellationToken, Task>)

Adds an And assertion with an explicit title observing a token.

public ThenChain<T> And(string title, Func<T, CancellationToken, Task> assertion)

Parameters

title string

Display title for the assertion.

assertion Func<T, CancellationToken, Task>

Asynchronous assertion that receives the carried value.

Returns

ThenChain<T>

A ThenChain<T> for further chaining.

And(string, Func<T, CancellationToken, ValueTask<bool>>)

Adds an And boolean assertion with an explicit title observing a token.

public ThenChain<T> And(string title, Func<T, CancellationToken, ValueTask<bool>> predicate)

Parameters

title string

Display title for the assertion.

predicate Func<T, CancellationToken, ValueTask<bool>>

Predicate evaluated against the carried value.

Returns

ThenChain<T>

A ThenChain<T> for further chaining.

And(string, Func<T, CancellationToken, ValueTask>)

Adds an And assertion with an explicit title observing a token.

public ThenChain<T> And(string title, Func<T, CancellationToken, ValueTask> assertion)

Parameters

title string

Display title for the assertion.

assertion Func<T, CancellationToken, ValueTask>

Asynchronous assertion that receives the carried value.

Returns

ThenChain<T>

A ThenChain<T> for further chaining.

And(string, Func<T, Task<bool>>)

Adds an And boolean assertion with an explicit title

public ThenChain<T> And(string title, Func<T, Task<bool>> predicate)

Parameters

title string

Display title for the assertion.

predicate Func<T, Task<bool>>

Predicate evaluated against the carried value.

Returns

ThenChain<T>

A ThenChain<T> for further chaining.

And(string, Func<T, Task>)

Adds an And assertion with an explicit title

public ThenChain<T> And(string title, Func<T, Task> assertion)

Parameters

title string

Display title for the assertion.

assertion Func<T, Task>

Asynchronous assertion that receives the carried value.

Returns

ThenChain<T>

A ThenChain<T> for further chaining.

And(string, Func<T, ValueTask<bool>>)

Adds an And boolean assertion with an explicit title

public ThenChain<T> And(string title, Func<T, ValueTask<bool>> predicate)

Parameters

title string

Display title for the assertion.

predicate Func<T, ValueTask<bool>>

Predicate evaluated against the carried value.

Returns

ThenChain<T>

A ThenChain<T> for further chaining.

And(string, Func<T, ValueTask>)

Adds an And assertion with an explicit title

public ThenChain<T> And(string title, Func<T, ValueTask> assertion)

Parameters

title string

Display title for the assertion.

assertion Func<T, ValueTask>

Asynchronous assertion that receives the carried value.

Returns

ThenChain<T>

A ThenChain<T> for further chaining.

AssertFailed(CancellationToken)

Completes the chain and asserts that any previous steps failed.

public Task AssertFailed(CancellationToken cancellationToken = default)

Parameters

cancellationToken CancellationToken

Token used to cancel the operation.

Returns

Task

Remarks

This method is functionally equivalent to calling the extension method AssertFailed(ScenarioContext) on the underlying ScenarioContext. It is provided for convenience to allow fluent chaining at the end of a scenario.

Exceptions

InvalidOperationException

Thrown when no step failed.

AssertPassed(CancellationToken)

Completes the chain and asserts that all previous steps passed.

public Task AssertPassed(CancellationToken cancellationToken = default)

Parameters

cancellationToken CancellationToken

Token used to cancel the operation.

Returns

Task

Remarks

This method is functionally equivalent to calling the extension method AssertPassed(ScenarioContext) on the underlying ScenarioContext. It is provided for convenience to allow fluent chaining at the end of a scenario.

Exceptions

InvalidOperationException

Thrown when at least one step failed.

But(Action<T>)

Adds a But assertion with a default title using a synchronous action.

public ThenChain<T> But(Action<T> assertion)

Parameters

assertion Action<T>

Asynchronous assertion that receives the carried value.

Returns

ThenChain<T>

A ThenChain<T> for further chaining.

But(Func<Task>)

Adds a But assertion with a default title (no value parameter).

public ThenChain<T> But(Func<Task> assertion)

Parameters

assertion Func<Task>

Asynchronous assertion.

Returns

ThenChain<T>

A ThenChain<T> for further chaining.

But(Func<T, bool>)

Adds an But boolean assertion with a default title

public ThenChain<T> But(Func<T, bool> predicate)

Parameters

predicate Func<T, bool>

Predicate evaluated against the carried value.

Returns

ThenChain<T>

A ThenChain<T> for further chaining.

But(Func<T, CancellationToken, Task<bool>>)

Adds an But boolean assertion with a default title observing a token.

public ThenChain<T> But(Func<T, CancellationToken, Task<bool>> predicate)

Parameters

predicate Func<T, CancellationToken, Task<bool>>

Predicate evaluated against the carried value.

Returns

ThenChain<T>

A ThenChain<T> for further chaining.

But(Func<T, CancellationToken, Task>)

Adds an But assertion with a default title observing a token.

public ThenChain<T> But(Func<T, CancellationToken, Task> assertion)

Parameters

assertion Func<T, CancellationToken, Task>

Asynchronous assertion that receives the carried value.

Returns

ThenChain<T>

A ThenChain<T> for further chaining.

But(Func<T, CancellationToken, ValueTask<bool>>)

Adds an But boolean assertion with a default title observing a token.

public ThenChain<T> But(Func<T, CancellationToken, ValueTask<bool>> predicate)

Parameters

predicate Func<T, CancellationToken, ValueTask<bool>>

Predicate evaluated against the carried value.

Returns

ThenChain<T>

A ThenChain<T> for further chaining.

But(Func<T, CancellationToken, ValueTask>)

Adds an But assertion with a default title observing a token.

public ThenChain<T> But(Func<T, CancellationToken, ValueTask> assertion)

Parameters

assertion Func<T, CancellationToken, ValueTask>

Asynchronous assertion that receives the carried value.

Returns

ThenChain<T>

A ThenChain<T> for further chaining.

But(Func<T, Task<bool>>)

Adds an But boolean assertion with a default title

public ThenChain<T> But(Func<T, Task<bool>> predicate)

Parameters

predicate Func<T, Task<bool>>

Predicate evaluated against the carried value.

Returns

ThenChain<T>

A ThenChain<T> for further chaining.

But(Func<T, Task>)

Adds an But assertion with a default title

public ThenChain<T> But(Func<T, Task> assertion)

Parameters

assertion Func<T, Task>

Asynchronous assertion that receives the carried value.

Returns

ThenChain<T>

A ThenChain<T> for further chaining.

But(Func<T, ValueTask<bool>>)

Adds an But boolean assertion with a default title

public ThenChain<T> But(Func<T, ValueTask<bool>> predicate)

Parameters

predicate Func<T, ValueTask<bool>>

Predicate evaluated against the carried value.

Returns

ThenChain<T>

A ThenChain<T> for further chaining.

But(Func<T, ValueTask>)

Adds an But assertion with a default title

public ThenChain<T> But(Func<T, ValueTask> assertion)

Parameters

assertion Func<T, ValueTask>

Asynchronous assertion that receives the carried value.

Returns

ThenChain<T>

A ThenChain<T> for further chaining.

But(string, Action<T>)

Adds a But assertion with an explicit title using a synchronous action.

public ThenChain<T> But(string title, Action<T> assertion)

Parameters

title string

Display title for the assertion.

assertion Action<T>

Asynchronous assertion that receives the carried value.

Returns

ThenChain<T>

A ThenChain<T> for further chaining.

But(string, Func<Task>)

Adds a But assertion with an explicit title (no value parameter).

public ThenChain<T> But(string title, Func<Task> assertion)

Parameters

title string

Display title for the assertion.

assertion Func<Task>

Asynchronous assertion.

Returns

ThenChain<T>

A ThenChain<T> for further chaining.

But(string, Func<T, bool>)

Adds an But boolean assertion with an explicit title

public ThenChain<T> But(string title, Func<T, bool> predicate)

Parameters

title string

Display title for the assertion.

predicate Func<T, bool>

Predicate evaluated against the carried value.

Returns

ThenChain<T>

A ThenChain<T> for further chaining.

But(string, Func<T, CancellationToken, Task<bool>>)

Adds an But boolean assertion with an explicit title observing a token.

public ThenChain<T> But(string title, Func<T, CancellationToken, Task<bool>> predicate)

Parameters

title string

Display title for the assertion.

predicate Func<T, CancellationToken, Task<bool>>

Predicate evaluated against the carried value.

Returns

ThenChain<T>

A ThenChain<T> for further chaining.

But(string, Func<T, CancellationToken, Task>)

Adds an But assertion with an explicit title observing a token.

public ThenChain<T> But(string title, Func<T, CancellationToken, Task> assertion)

Parameters

title string

Display title for the assertion.

assertion Func<T, CancellationToken, Task>

Asynchronous assertion that receives the carried value.

Returns

ThenChain<T>

A ThenChain<T> for further chaining.

But(string, Func<T, CancellationToken, ValueTask<bool>>)

Adds an But boolean assertion with an explicit title observing a token.

public ThenChain<T> But(string title, Func<T, CancellationToken, ValueTask<bool>> predicate)

Parameters

title string

Display title for the assertion.

predicate Func<T, CancellationToken, ValueTask<bool>>

Predicate evaluated against the carried value.

Returns

ThenChain<T>

A ThenChain<T> for further chaining.

But(string, Func<T, CancellationToken, ValueTask>)

Adds an But assertion with an explicit title observing a token.

public ThenChain<T> But(string title, Func<T, CancellationToken, ValueTask> assertion)

Parameters

title string

Display title for the assertion.

assertion Func<T, CancellationToken, ValueTask>

Asynchronous assertion that receives the carried value.

Returns

ThenChain<T>

A ThenChain<T> for further chaining.

But(string, Func<T, Task<bool>>)

Adds an But boolean assertion with an explicit title

public ThenChain<T> But(string title, Func<T, Task<bool>> predicate)

Parameters

title string

Display title for the assertion.

predicate Func<T, Task<bool>>

Predicate evaluated against the carried value.

Returns

ThenChain<T>

A ThenChain<T> for further chaining.

But(string, Func<T, Task>)

Adds an But assertion with an explicit title

public ThenChain<T> But(string title, Func<T, Task> assertion)

Parameters

title string

Display title for the assertion.

assertion Func<T, Task>

Asynchronous assertion that receives the carried value.

Returns

ThenChain<T>

A ThenChain<T> for further chaining.

But(string, Func<T, ValueTask<bool>>)

Adds an But boolean assertion with an explicit title

public ThenChain<T> But(string title, Func<T, ValueTask<bool>> predicate)

Parameters

title string

Display title for the assertion.

predicate Func<T, ValueTask<bool>>

Predicate evaluated against the carried value.

Returns

ThenChain<T>

A ThenChain<T> for further chaining.

But(string, Func<T, ValueTask>)

Adds an But assertion with an explicit title

public ThenChain<T> But(string title, Func<T, ValueTask> assertion)

Parameters

title string

Display title for the assertion.

assertion Func<T, ValueTask>

Asynchronous assertion that receives the carried value.

Returns

ThenChain<T>

A ThenChain<T> for further chaining.

Finally(Action<T>)

Registers a cleanup handler that executes after all steps complete. The handler receives the current chain value and executes even if subsequent steps fail.

public ThenChain<T> Finally(Action<T> effect)

Parameters

effect Action<T>

Cleanup action that receives the carried value.

Returns

ThenChain<T>

The same ThenChain<T> for further chaining.

Finally(Func<T, CancellationToken, Task>)

Registers a cleanup handler that executes after all steps complete. The handler receives the current chain value and executes even if subsequent steps fail.

public ThenChain<T> Finally(Func<T, CancellationToken, Task> effect)

Parameters

effect Func<T, CancellationToken, Task>

Cleanup action that receives the carried value.

Returns

ThenChain<T>

The same ThenChain<T> for further chaining.

Finally(Func<T, CancellationToken, ValueTask>)

Registers a cleanup handler that executes after all steps complete. The handler receives the current chain value and executes even if subsequent steps fail.

public ThenChain<T> Finally(Func<T, CancellationToken, ValueTask> effect)

Parameters

effect Func<T, CancellationToken, ValueTask>

Cleanup action that receives the carried value.

Returns

ThenChain<T>

The same ThenChain<T> for further chaining.

Finally(Func<T, Task>)

Registers a cleanup handler that executes after all steps complete. The handler receives the current chain value and executes even if subsequent steps fail.

public ThenChain<T> Finally(Func<T, Task> effect)

Parameters

effect Func<T, Task>

Cleanup action that receives the carried value.

Returns

ThenChain<T>

The same ThenChain<T> for further chaining.

Finally(Func<T, ValueTask>)

Registers a cleanup handler that executes after all steps complete. The handler receives the current chain value and executes even if subsequent steps fail.

public ThenChain<T> Finally(Func<T, ValueTask> effect)

Parameters

effect Func<T, ValueTask>

Cleanup action that receives the carried value.

Returns

ThenChain<T>

The same ThenChain<T> for further chaining.

Finally(string, Action<T>)

Registers a cleanup handler with an explicit title that executes after all steps complete. The handler receives the current chain value and executes even if subsequent steps fail.

public ThenChain<T> Finally(string title, Action<T> effect)

Parameters

title string

Display title for this finally handler.

effect Action<T>

Cleanup action that receives the carried value.

Returns

ThenChain<T>

The same ThenChain<T> for further chaining.

Finally(string, Func<T, CancellationToken, Task>)

Registers a cleanup handler with an explicit title that executes after all steps complete. The handler receives the current chain value and executes even if subsequent steps fail.

public ThenChain<T> Finally(string title, Func<T, CancellationToken, Task> effect)

Parameters

title string

Display title for this finally handler.

effect Func<T, CancellationToken, Task>

Cleanup action that receives the carried value.

Returns

ThenChain<T>

The same ThenChain<T> for further chaining.

Finally(string, Func<T, CancellationToken, ValueTask>)

Registers a cleanup handler with an explicit title that executes after all steps complete. The handler receives the current chain value and executes even if subsequent steps fail.

public ThenChain<T> Finally(string title, Func<T, CancellationToken, ValueTask> effect)

Parameters

title string

Display title for this finally handler.

effect Func<T, CancellationToken, ValueTask>

Cleanup action that receives the carried value.

Returns

ThenChain<T>

The same ThenChain<T> for further chaining.

Finally(string, Func<T, Task>)

Registers a cleanup handler with an explicit title that executes after all steps complete. The handler receives the current chain value and executes even if subsequent steps fail.

public ThenChain<T> Finally(string title, Func<T, Task> effect)

Parameters

title string

Display title for this finally handler.

effect Func<T, Task>

Cleanup action that receives the carried value.

Returns

ThenChain<T>

The same ThenChain<T> for further chaining.

Finally(string, Func<T, ValueTask>)

Registers a cleanup handler with an explicit title that executes after all steps complete. The handler receives the current chain value and executes even if subsequent steps fail.

public ThenChain<T> Finally(string title, Func<T, ValueTask> effect)

Parameters

title string

Display title for this finally handler.

effect Func<T, ValueTask>

Cleanup action that receives the carried value.

Returns

ThenChain<T>

The same ThenChain<T> for further chaining.

GetAwaiter()

Gets an awaiter that executes the queued scenario steps when awaited.

public ValueTaskAwaiter GetAwaiter()

Returns

ValueTaskAwaiter

The awaiter for the underlying asynchronous execution.

When(Action<T>)

public ScenarioChain<T> When(Action<T> effect)

Parameters

effect Action<T>

Returns

ScenarioChain<T>

When(Func<T, CancellationToken, Task>)

public ScenarioChain<T> When(Func<T, CancellationToken, Task> effect)

Parameters

effect Func<T, CancellationToken, Task>

Returns

ScenarioChain<T>

When(Func<T, CancellationToken, ValueTask>)

public ScenarioChain<T> When(Func<T, CancellationToken, ValueTask> effect)

Parameters

effect Func<T, CancellationToken, ValueTask>

Returns

ScenarioChain<T>

When(Func<T, Task>)

public ScenarioChain<T> When(Func<T, Task> effect)

Parameters

effect Func<T, Task>

Returns

ScenarioChain<T>

When(Func<T, ValueTask>)

public ScenarioChain<T> When(Func<T, ValueTask> effect)

Parameters

effect Func<T, ValueTask>

Returns

ScenarioChain<T>

When(string, Action<T>)

public ScenarioChain<T> When(string title, Action<T> effect)

Parameters

title string
effect Action<T>

Returns

ScenarioChain<T>

When(string, Func<T, CancellationToken, Task>)

public ScenarioChain<T> When(string title, Func<T, CancellationToken, Task> effect)

Parameters

title string
effect Func<T, CancellationToken, Task>

Returns

ScenarioChain<T>

When(string, Func<T, CancellationToken, ValueTask>)

public ScenarioChain<T> When(string title, Func<T, CancellationToken, ValueTask> effect)

Parameters

title string
effect Func<T, CancellationToken, ValueTask>

Returns

ScenarioChain<T>

When(string, Func<T, Task>)

public ScenarioChain<T> When(string title, Func<T, Task> effect)

Parameters

title string
effect Func<T, Task>

Returns

ScenarioChain<T>

When(string, Func<T, ValueTask>)

public ScenarioChain<T> When(string title, Func<T, ValueTask> effect)

Parameters

title string
effect Func<T, ValueTask>

Returns

ScenarioChain<T>

When<TOut>(Func<T, CancellationToken, Task<TOut>>)

public ScenarioChain<TOut> When<TOut>(Func<T, CancellationToken, Task<TOut>> f)

Parameters

f Func<T, CancellationToken, Task<TOut>>

Returns

ScenarioChain<TOut>

Type Parameters

TOut

When<TOut>(Func<T, CancellationToken, ValueTask<TOut>>)

public ScenarioChain<TOut> When<TOut>(Func<T, CancellationToken, ValueTask<TOut>> f)

Parameters

f Func<T, CancellationToken, ValueTask<TOut>>

Returns

ScenarioChain<TOut>

Type Parameters

TOut

When<TOut>(Func<T, Task<TOut>>)

public ScenarioChain<TOut> When<TOut>(Func<T, Task<TOut>> f)

Parameters

f Func<T, Task<TOut>>

Returns

ScenarioChain<TOut>

Type Parameters

TOut

When<TOut>(Func<T, ValueTask<TOut>>)

public ScenarioChain<TOut> When<TOut>(Func<T, ValueTask<TOut>> f)

Parameters

f Func<T, ValueTask<TOut>>

Returns

ScenarioChain<TOut>

Type Parameters

TOut

When<TOut>(Func<T, TOut>)

public ScenarioChain<TOut> When<TOut>(Func<T, TOut> f)

Parameters

f Func<T, TOut>

Returns

ScenarioChain<TOut>

Type Parameters

TOut

When<TOut>(string, Func<T, CancellationToken, Task<TOut>>)

public ScenarioChain<TOut> When<TOut>(string title, Func<T, CancellationToken, Task<TOut>> f)

Parameters

title string
f Func<T, CancellationToken, Task<TOut>>

Returns

ScenarioChain<TOut>

Type Parameters

TOut

When<TOut>(string, Func<T, CancellationToken, ValueTask<TOut>>)

public ScenarioChain<TOut> When<TOut>(string title, Func<T, CancellationToken, ValueTask<TOut>> f)

Parameters

title string
f Func<T, CancellationToken, ValueTask<TOut>>

Returns

ScenarioChain<TOut>

Type Parameters

TOut

When<TOut>(string, Func<T, Task<TOut>>)

public ScenarioChain<TOut> When<TOut>(string title, Func<T, Task<TOut>> f)

Parameters

title string
f Func<T, Task<TOut>>

Returns

ScenarioChain<TOut>

Type Parameters

TOut

When<TOut>(string, Func<T, ValueTask<TOut>>)

public ScenarioChain<TOut> When<TOut>(string title, Func<T, ValueTask<TOut>> f)

Parameters

title string
f Func<T, ValueTask<TOut>>

Returns

ScenarioChain<TOut>

Type Parameters

TOut

When<TOut>(string, Func<T, TOut>)

public ScenarioChain<TOut> When<TOut>(string title, Func<T, TOut> f)

Parameters

title string
f Func<T, TOut>

Returns

ScenarioChain<TOut>

Type Parameters

TOut

See Also