Table of Contents

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

initialValue T

The initial value of the behavior.

Returns

BehaviorSink<T>

Type Parameters

T

The 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

initialValue T

The initial value of the behavior.

coalesce Func<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

T

The type of values in the behavior sink.