Method Calm
- Namespace
- SodaFlow
- Assembly
- SodaFlow.dll
Calm<T>(Stream<T>)
Return a stream that only outputs events which have a different value than the previous event.
public static Stream<T> Calm<T>(this Stream<T> s)
Parameters
sStream<T>The stream.
Returns
- Stream<T>
A stream that only outputs events which have a different value than the previous event.
Type Parameters
TThe type of the stream.
Calm<T>(Stream<T>, IEqualityComparer<T>)
Return a stream that only outputs events which have a different value than the previous event.
public static Stream<T> Calm<T>(this Stream<T> s, IEqualityComparer<T> comparer)
Parameters
sStream<T>The stream.
comparerIEqualityComparer<T>The equality comparer that gives true when two items are equal.
Returns
- Stream<T>
A stream that only outputs events which have a different value than the previous event.
Type Parameters
TThe type of the stream.
Calm<T>(Stream<T>, Func<T, T, bool>)
Return a stream that only outputs events which have a different value than the previous event.
public static Stream<T> Calm<T>(this Stream<T> s, Func<T, T, bool> areEqual)
Parameters
sStream<T>The stream.
areEqualFunc<T, T, bool>The function that gives true when two items are equal.
Returns
- Stream<T>
A stream that only outputs events which have a different value than the previous event.
Type Parameters
TThe type of the stream.