In Today’s section, we will talk about Rx library. Basically, Rx is a library for composing asynchronous and event based programs using observable collections. This is very useful in the cases where in you are pulling data asynchronously from different sources and then manipulating the same and finally printing the result. In these kind of scenarios, you have to write lots of glue code and off-course, these codes will be error prone as one of the sources if just throws error, then what will happen?
This way, you really need to do lots of stuff for the things working fine. Hence, Rx is answer to this kind of situation, which keeps the thing simple yet lightweight. Rx also uses LINQ query on the observable collections.
But, it would be nice to talk little about collections before starting Rx. IEnumerables are one of the most widely used Pull Based collection which is synchronous in nature. Below is the sample snippet for the same.
3,181 total views, 1 views today