Method CreateSink
- Namespace
- SodaFlow
- Assembly
- SodaFlow.dll
CreateSink<T>(T)
Creates a writable behavior that uses the last value if Send<T>(BehaviorSink<T>, T) gets more than one call per transaction.
public static BehaviorSink<T> CreateSink<T>(T initialValue)
Parameters
initialValueTThe initial value of the behavior.
Returns
- BehaviorSink<T>
Type Parameters
TThe type of values in the behavior sink.
CreateSink<T>(T, Func<T, T, T>)
Creates a writable behavior that uses coalesce to put
values together when Send<T>(BehaviorSink<T>, T)
gets more than one call in one transaction.
public static BehaviorSink<T> CreateSink<T>(T initialValue, Func<T, T, T> coalesce)
Parameters
initialValueTThe initial value of the behavior.
coalesceFunc<T, T, T>Function to put values together when Send<T>(BehaviorSink<T>, T) gets a call more than one time per transaction.
Returns
- BehaviorSink<T>
Type Parameters
TThe type of values in the behavior sink.