Class FaultObserver<TSource>
Observer implementation that throws an exception for each access.
Inheritance
System.Object
FaultObserver<TSource>
Implements
System.IObserver<TSource>
Namespace: Reaqtive
Assembly: Reaqtive.Core.dll
Syntax
public class FaultObserver<TSource> : Object, IObserver<TSource>
Type Parameters
Name | Description |
---|---|
TSource | Type of the elements received by the observer. |
Constructors
FaultObserver(Func<Exception>)
Creates a new observer that throws an exception for each access.
Declaration
public FaultObserver(Func<Exception> getFault)
Parameters
Type | Name | Description |
---|---|---|
System.Func<System.Exception> | getFault | Function to get the exception to throw for each access to the observer. |
Fields
Disposed
Singleton instance of an observer that throws ObjectDisposedException for each access.
Declaration
public static readonly IObserver<TSource> Disposed
Field Value
Type | Description |
---|---|
System.IObserver<TSource> |
Methods
OnCompleted()
Processes a completion notification by throwing a fault.
Declaration
public void OnCompleted()
OnError(Exception)
Processes an error notification by throwing a fault.
Declaration
public void OnError(Exception error)
Parameters
Type | Name | Description |
---|---|---|
System.Exception | error | Error to process. |
OnNext(TSource)
Processes a value notification by throwing a fault.
Declaration
public void OnNext(TSource value)
Parameters
Type | Name | Description |
---|---|---|
TSource | value | Value to process. |
Implements
System.IObserver<>