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
initialValueTThe initial value of the cell.
Returns
- CellSink<T>
Type Parameters
TThe 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
initialValueTThe initial value of the cell.
coalesceFunc<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
TThe type of the value in the cell sink.