Advanced operators
Sometimes, we need functions to create message repetitions or to manipulate or reuse a subscription with multiple observers. This is the time when advanced operators come into play.
IgnoreElements
The IgnoreElements
factory method creates a new sequence that will ignore any value message. Instead, errors and completion messages will normally flow out from the sourcing sequence.
This method is particularly useful to create multiple acknowledgements or simply to append some completion code to a sourcing sequence. Here's an example:
//the sourcing sequence of errors or completed messages var sourcingSequence = Observable.Throw<object>(new Exception("Test")); //a sequence able to handle only errors or completed messages var ignoredElements ...
Get Reactive Programming for .NET Developers now with the O’Reilly learning platform.
O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.