mirror of
https://github.com/m-lamonaca/dev-notes.git
synced 2025-04-07 11:26:41 +00:00
Fix notes formatting
This commit is contained in:
parent
1956ebbf0d
commit
9e59eeeea4
1 changed files with 5 additions and 4 deletions
|
@ -1,6 +1,6 @@
|
||||||
# Reactive Extensions (Rx)
|
# Reactive Extensions (Rx)
|
||||||
|
|
||||||
The **Reactive Extensions** for .NET, or **Rx**, are designed for working with asynchro‐nous and event-based sources of information.
|
The **Reactive Extensions** for .NET, or **Rx**, are designed for working with asynchronous and event-based sources of information.
|
||||||
Rx provides services that help orchestrate and synchronize the way code reacts to data from these kinds of sources.
|
Rx provides services that help orchestrate and synchronize the way code reacts to data from these kinds of sources.
|
||||||
|
|
||||||
Rx’s fundamental abstraction, `IObservable<T>`, represents a sequence of items, and its operators are defined as extension methods for this interface.
|
Rx’s fundamental abstraction, `IObservable<T>`, represents a sequence of items, and its operators are defined as extension methods for this interface.
|
||||||
|
@ -14,8 +14,8 @@ Because Rx implements standard LINQ operators, it's possible to write queries ag
|
||||||
|
|
||||||
## Foundamental Interfaces
|
## Foundamental Interfaces
|
||||||
|
|
||||||
The two most important types in Rx are the `IObservable<T>` and `IObserver<T>` interfaces. They are important enough to be in the System namespace.
|
The two most important types in Rx are the `IObservable<T>` and `IObserver<T>` interfaces.
|
||||||
The other parts of Rx are in the `System.Reactive` NuGet package.
|
They are important enough to be in the System namespace. The other parts of Rx are in the `System.Reactive` NuGet package.
|
||||||
|
|
||||||
```cs
|
```cs
|
||||||
public interface IObservable<out T>
|
public interface IObservable<out T>
|
||||||
|
@ -31,7 +31,8 @@ public interface IObserver<in T>
|
||||||
}
|
}
|
||||||
```
|
```
|
||||||
|
|
||||||
The fundamental abstraction in Rx, `IObservable<T>`, is implemented by *event sources*. Instead of using the `event` keyword, it models events as a *sequence of items*. An `IObservable<T>` provides items to subscribers as and when it’s ready to.
|
The fundamental abstraction in Rx, `IObservable<T>`, is implemented by *event sources*. Instead of using the `event` keyword, it models events as a *sequence of items*.
|
||||||
|
An `IObservable<T>` provides items to subscribers as and when it’s ready to do so.
|
||||||
|
|
||||||
It's possible to subscribe to a source by passing an implementation of `IObserver<T>` to the `Subscribe` method.
|
It's possible to subscribe to a source by passing an implementation of `IObserver<T>` to the `Subscribe` method.
|
||||||
The source will invoke `OnNext` when it wants to report events, and it can call `OnCompleted` to indicate that there will be no further activity.
|
The source will invoke `OnNext` when it wants to report events, and it can call `OnCompleted` to indicate that there will be no further activity.
|
||||||
|
|
Loading…
Add table
Reference in a new issue