Class NopObserver<TSource>
Observer implementation that simply ignores any notifications it receives.
Inheritance
System.Object
NopObserver<TSource>
Implements
System.IObserver<TSource>
Namespace: Reaqtive
Assembly: Reaqtive.Core.dll
Syntax
public class NopObserver<TSource> : Object, IObserver<TSource>
Type Parameters
Name | Description |
---|---|
TSource | Type of the elements received by the observer. |
Constructors
NopObserver()
Creates a new observer that ignores notifications it receives.
Declaration
public NopObserver()
Fields
Instance
Singleton instance of an observer that ignores any notifications it receives.
Declaration
public static readonly NopObserver<TSource> Instance
Field Value
Type | Description |
---|---|
NopObserver<TSource> |
Methods
OnCompleted()
Processes an OnCompleted notification without any side-effects.
Declaration
public void OnCompleted()
OnError(Exception)
Processes an OnError notification without any side-effects.
Declaration
public void OnError(Exception error)
Parameters
Type | Name | Description |
---|---|---|
System.Exception | error | Error received by the observer. |
OnNext(TSource)
Processes an OnNext notification without any side-effects.
Declaration
public void OnNext(TSource value)
Parameters
Type | Name | Description |
---|---|---|
TSource | value | Element value received by the observer. |
Implements
System.IObserver<>