Table of Contents

Method Gate

Namespace
SodaFlow
Assembly
SodaFlow.dll

Gate<T>(Stream<T>, Cell<bool>)

    Return a stream that only outputs events from the input stream when the
    specified cell's value is

    <pre><code class="lang-csharp">true</code></pre>

.

public static Stream<T> Gate<T>(this Stream<T> s, Cell<bool> c)

Parameters

s Stream<T>

The stream.

c Cell<bool>

The cell that acts as a gate.

Returns

Stream<T>
    A stream that only outputs events from the input stream when the specified
    cell's value is

    <pre><code class="lang-csharp">true</code></pre>

.

Type Parameters

T

The type of the stream.

Gate<T>(Stream<T>, Behavior<bool>)

Return a stream that only outputs events from the input stream when the specified behavior's value is

true

.

public static Stream<T> Gate<T>(this Stream<T> s, Behavior<bool> b)

Parameters

s Stream<T>

The stream.

b Behavior<bool>

The behavior that acts as a gate.

Returns

Stream<T>
    A stream that only outputs events from the input stream when the specified
    behavior's value is

    <pre><code class="lang-csharp">true</code></pre>

.

Type Parameters

T

The type of the stream.