Skip to content

Operators

Luis Llamas edited this page Apr 25, 2019 · 11 revisions

Operator Where

Emit the item received if it satisfy a condition

Where(ReactiveCondition<T> condition)

Operator Distinct

Emits the item received if is not equal to the last item received

Distinct() 

Operator First

Emits the first item in a sequence, when the sequence is complete

First()

To emit as soon as received use TakeFirst()

Operator Last

Emits the last item in a sequence, when the sequence is complete

First()

To emit as soon as received use TakeLast()

Last()

Operator Skip

Skips N items received

Skip(size_t num)

Operator SkipUntil

Skips until received item satisfy a condition

SkipUntil(ReactiveCondition<T> condition)

Operator SkipWhile

Skips while received item satisfy a condition

SkipWhile(ReactiveCondition<T> condition)

Operator Take

Emits the N first items received

Take(size_t num)

Operator TakeAt

Emits the N item received

TakeAt(size_t index)

Operator TakeFirst

Emits the first item received

TakeFirst()

Operator TakeLast

Emits the last item received

TakeLast()

Operator TakeUntil

Emits until received item satisfy a condition

TakeUntil(ReactiveCondition<T> condition)

Operator TakeWhile

Emits while received item satisfy a condition

TakeWhile(ReactiveCondition<T> condition)

Operator Batch

Emits recevied items in N-size batchs, emits Completed after each batch, and reset automatically

Batch(size_t num)

Operator Timeout

Emits received items, but call a callback action if time between elements is greater than an interval

Millis version

TimeoutMillis(ReactiveAction<T> action)

Micros version

TimeoutMicros(ReactiveAction<T> action)

Need to call Update() method manually as frequently as posible

Operator ForEach

Performs an action each time it received an item

ForEach(ReactiveAction<T> function)

Operator If

Performs an action each time if the item received satisfy a condition

If(ReactiveCondition<T> condition, ReactiveAction<T> function)

Operator Loop

Loops a sequence forever

Loop()

Operator Repeat

Repeat a sequence N times

Repeat(size_t N)

Operator Reset

Breaks the reset signal upwards

Reset()

Call Reset() method manually when necessary

Operator NotReset

Breaks the reset signal upwards

NotReset()
Clone this wiki locally