gitmyhub

reactive

C# ★ 7.2k updated 3d ago

The Reactive Extensions for .NET

A set of C# libraries for working with live data streams, stock feeds, sensor readings, user clicks, using the same filtering and query tools you would use on a regular list, without writing polling loops or manual event wiring.

C#.NETNuGetsetup: easycomplexity 3/5

The Reactive Extensions for .NET, known as Rx.NET, is a set of C# libraries for writing code that responds to streams of data as they arrive over time, rather than working only with data that is already in memory. The central idea is that live information sources, like stock price feeds, sensor readings, user clicks, or network events, should be as easy to work with as a regular list or array. Rx.NET makes that possible by giving you the same query and filtering tools you would use on a list, but applied to data arriving continuously.

For example, if you have a stream of financial trades coming in live, you can write a filter in a couple of lines to keep only the ones above a certain volume, and the result is itself a live stream that updates automatically whenever a new matching trade arrives. No polling loop, no manual event wiring.

The repository contains four related libraries. The main one is Rx.NET itself, for event-driven programming with observable sequences. A second, currently experimental, is AsyncRx.NET, which extends the model to work more naturally with modern async/await patterns in C#. The other two, called Ix.NET, add extra query operators for working with both regular and asynchronous enumerable sequences.

All four are available as NuGet packages, which is the standard way to add libraries to .NET projects. A free book called Introduction to Rx.NET is linked from the README in multiple formats including PDF and web, covering the concepts from the ground up. The project is part of the official .NET organization on GitHub.

Where it fits