O'Reilly logo

Functional Programming in C#: How to write better C# code by Enrico Buonanno

Stay ahead with the world's most comprehensive technology and business learning platform.

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, tutorials, and more.

Start Free Trial

No credit card required

Chapter 14. Data streams and the Reactive Extensions

This chapter covers

  • Using IObservable to represent data streams
  • Creating, transforming, and combining IObservables
  • Knowing when you should use IObservable

In chapter 13, you gained a good understanding of asynchronous values—values that are received at some point in the future. What about a series of asynchronous values? For example, say you have an event-sourced system like the one in chapter 10; how can you model the stream of events that are produced and define downstream processing of those events? For example, say you want to recompute an account’s balance with every transaction, and send a notification if it becomes negative?

The IObservable interface provides an abstraction to ...

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, interactive tutorials, and more.

Start Free Trial

No credit card required