Table of Contents

Method CreateSink

Namespace
SodaFlow
Assembly
SodaFlow.dll

CreateSink<T>(T)

Makes a writable cell that uses the last value if Send<T>(CellSink<T>, T) gets a call more than one time per transaction.

public static CellSink<T> CreateSink<T>(T initialValue)

Parameters

initialValue T

The initial value of the cell.

Returns

CellSink<T>

Type Parameters

T

The type of the value in the cell sink.

CreateSink<T>(T, Func<T, T, T>)

Makes a writable cell that uses coalesce to put values together when Send<T>(CellSink<T>, T) gets more than one call per transaction.

public static CellSink<T> CreateSink<T>(T initialValue, Func<T, T, T> coalesce)

Parameters

initialValue T

The initial value of the cell.

coalesce Func<T, T, T>

Function to put values together when Send<T>(CellSink<T>, T) gets more than one call in each transaction.

Returns

CellSink<T>

Type Parameters

T

The type of the value in the cell sink.