This chapter covers
- Creating observables of data and events
- Creating observables from enumerables
- Using Rx creational operators
- Getting to know the primitive observables
When people start learning about Rx, they usually ask, “Where do I begin?” The answer is easy: you should start with creating the observable.
In the next two chapters, you’ll learn various ways to create observables. This chapter is limited to observables that are synchronous in their creation. Chapter 5 covers observables that involve asynchroncity in their creation and emissions.
Because many types of sources exist from which you want to receive items, it’s not surprising that you have more than one way to create an observable. For instance, you can create an observable from traditional .NET events so you can still reuse your existing code, or you can create it from collections of items so it’s easier to combine it with other observables. Each way is suited to different scenarios and has different implications, such as simplicity and readability.