Table of Contents

FlipFlopAsync Method

Definition

Namespace
Cuemon
Assemblies
Cuemon.Kernel.dll
Source
src/Cuemon.Kernel/Condition.cs

FlipFlopAsync(bool, Func<Task>, Func<Task>)

Invokes one of two expressions depending on the value of condition.

public static Task FlipFlopAsync(bool condition, Func<Task> firstExpression, Func<Task> secondExpression)

Parameters

condition bool

When true, the firstExpression is invoked; when false, the secondExpression is invoked.

firstExpression Func<Task>

The function delegate that is invoked when condition is true.

secondExpression Func<Task>

The function delegate that is invoked when condition is false.

Returns

Task

A Task that represents the asynchronous operation.