IObserver interface
This core level interface is available within the Base Class Library (BCL) of .NET 4.0 and is available for the older 3.5 as an add-on.
The use is pretty simple and the goal is to provide a standard way of handling the most basic features of any reactive message consumer.
As already seen in the previous chapter, reactive messages flow by a producer and a consumer and subscribe for some messages. The IObserver
C# interface is available to construct message receivers that comply with the reactive programming layout by implementing the three main message-oriented events: a message received, an error received, and a task completed message.
The IObserver
interface has the following sign and description:
// Summary: // Provides a mechanism for receiving push-based notifications. // // Type parameters: // T: // The object that provides notification information.This type parameter is // contravariant. That is, you can use either the...