Search Results for

    Show / Hide Table of Contents

    Class AnonymousObserver<T>

    Class to create an IObserver<T> instance from delegate-based implementations of the On* methods.

    Inheritance
    Object
    ObserverBase<T>
    AnonymousObserver<T>
    Implements
    IObserver<T>
    IDisposable
    Inherited Members
    ObserverBase<T>.OnNext(T)
    ObserverBase<T>.OnError(Exception)
    ObserverBase<T>.OnCompleted()
    ObserverBase<T>.Dispose()
    ObserverBase<T>.Dispose(Boolean)
    Object.Equals(Object)
    Object.Equals(Object, Object)
    Object.GetHashCode()
    Object.GetType()
    Object.MemberwiseClone()
    Object.ToString()
    Object.ReferenceEquals(Object, Object)
    Namespace: System.Reactive
    Assembly: System.Reactive.Core.dll
    Syntax
    public sealed class AnonymousObserver<T> : ObserverBase<T>, IObserver<T>, IDisposable
    Type Parameters
    Name Description
    T

    The type of the elements in the sequence.

    Constructors

    | Improve this Doc View Source

    AnonymousObserver(Action<T>)

    Creates an observer from the specified OnNext action.

    Declaration
    public AnonymousObserver(Action<T> onNext)
    Parameters
    Type Name Description
    Action<T> onNext

    Observer's OnNext action implementation.

    Exceptions
    Type Condition
    ArgumentNullException

    onNext is null.

    | Improve this Doc View Source

    AnonymousObserver(Action<T>, Action)

    Creates an observer from the specified OnNext and OnCompleted actions.

    Declaration
    public AnonymousObserver(Action<T> onNext, Action onCompleted)
    Parameters
    Type Name Description
    Action<T> onNext

    Observer's OnNext action implementation.

    Action onCompleted

    Observer's OnCompleted action implementation.

    Exceptions
    Type Condition
    ArgumentNullException

    onNext or onCompleted is null.

    | Improve this Doc View Source

    AnonymousObserver(Action<T>, Action<Exception>)

    Creates an observer from the specified OnNext and OnError actions.

    Declaration
    public AnonymousObserver(Action<T> onNext, Action<Exception> onError)
    Parameters
    Type Name Description
    Action<T> onNext

    Observer's OnNext action implementation.

    Action<Exception> onError

    Observer's OnError action implementation.

    Exceptions
    Type Condition
    ArgumentNullException

    onNext or onError is null.

    | Improve this Doc View Source

    AnonymousObserver(Action<T>, Action<Exception>, Action)

    Creates an observer from the specified OnNext, OnError, and OnCompleted actions.

    Declaration
    public AnonymousObserver(Action<T> onNext, Action<Exception> onError, Action onCompleted)
    Parameters
    Type Name Description
    Action<T> onNext

    Observer's OnNext action implementation.

    Action<Exception> onError

    Observer's OnError action implementation.

    Action onCompleted

    Observer's OnCompleted action implementation.

    Exceptions
    Type Condition
    ArgumentNullException

    onNext or onError or onCompleted is null.

    Methods

    | Improve this Doc View Source

    OnCompletedCore()

    Calls the onCompleted action.

    Declaration
    protected override void OnCompletedCore()
    Overrides
    System.Reactive.ObserverBase<T>.OnCompletedCore()
    | Improve this Doc View Source

    OnErrorCore(Exception)

    Calls the onError action.

    Declaration
    protected override void OnErrorCore(Exception error)
    Parameters
    Type Name Description
    Exception error

    The error that has occurred.

    Overrides
    System.Reactive.ObserverBase<T>.OnErrorCore(System.Exception)
    | Improve this Doc View Source

    OnNextCore(T)

    Calls the onNext action.

    Declaration
    protected override void OnNextCore(T value)
    Parameters
    Type Name Description
    T value

    Next element in the sequence.

    Overrides
    System.Reactive.ObserverBase<T>.OnNextCore(T)

    Implements

    System.IObserver<T>
    System.IDisposable

    Extension Methods

    Observer.ToNotifier<T>(IObserver<T>)
    Observer.AsObserver<T>(IObserver<T>)
    Observer.Checked<T>(IObserver<T>)
    Observer.NotifyOn<T>(IObserver<T>, IScheduler)
    Observer.NotifyOn<T>(IObserver<T>, SynchronizationContext)
    • Improve this Doc
    • View Source
    In This Article
    Back to top Generated by DocFX