← Back to all articles

Latch design pattern in Rx – more….

My original example isn't quite true to the pattern. Here is an updated version.

var latch = new BehaviorSubject<bool>(false);

var unlatchedEvents =
from args in someEvent
from isLatched in latch.Take(1)
where !isLatched
select args;

Enjoy...

Comments