Class Observer
Provides a set of methods to create observers.
Inheritance
Namespace: Reaqtive
Assembly: Reaqtive.Core.dll
Syntax
public static class Observer : Object
Methods
Create<T>(Action<T>)
Creates an observer using the specified delegates to implement its operations.
Declaration
public static IObserver<T> Create<T>(Action<T> onNext)
Parameters
| Type | Name | Description |
|---|---|---|
| System.Action<T> | onNext | Delegate implementing the observer's OnNext method. |
Returns
| Type | Description |
|---|---|
| System.IObserver<T> | An observer whose implementation invokes the specified delegates. |
Type Parameters
| Name | Description |
|---|---|
| T | Type of the elements received by the observer. |
Create<T>(Action<T>, Action<Exception>, Action)
Creates an observer using the specified delegates to implement its operations.
Declaration
public static IObserver<T> Create<T>(Action<T> onNext, Action<Exception> onError, Action onCompleted)
Parameters
| Type | Name | Description |
|---|---|---|
| System.Action<T> | onNext | Delegate implementing the observer's OnNext method. |
| System.Action<System.Exception> | onError | Delegate implementing the observer's OnError method. |
| System.Action | onCompleted | Delegate implementing the observer's OnCompleted method. |
Returns
| Type | Description |
|---|---|
| System.IObserver<T> | An observer whose implementation invokes the specified delegates. |
Type Parameters
| Name | Description |
|---|---|
| T | Type of the elements received by the observer. |
Nop<T>()
Returns an instance of an observer that ignores all of the notifications it receives.
Declaration
public static IObserver<T> Nop<T>()
Returns
| Type | Description |
|---|---|
| System.IObserver<T> | An observer that ignores all of the notifications it receives. |
Type Parameters
| Name | Description |
|---|---|
| T | Type of the elements received by the observer. |