Show / Hide Table of Contents

Class SimpleSubject<T>

Subject with a single observer.

Inheritance
System.Object
SimpleSubject<T>
Implements
IMultiSubject<T>
IMultiSubject<T, T>
ISubscribable<T>
System.IObservable<T>
System.IDisposable
System.IObserver<T>
Namespace: Reaqtive
Assembly: Reaqtive.Core.dll
Syntax
public class SimpleSubject<T> : Object, IMultiSubject<T>, IMultiSubject<T, T>, ISubscribable<T>, IObservable<T>, IDisposable, IObserver<T>
Type Parameters
Name Description
T

Type of the elements processed by the subject.

Constructors

SimpleSubject()

Declaration
public SimpleSubject()

Methods

CreateObserver()

Obtains the single observer used to push elements into the subject.

Declaration
public virtual IObserver<T> CreateObserver()
Returns
Type Description
System.IObserver<T>

Observer used to push elements into the subject.

Dispose()

Disposes the subject.

Declaration
public void Dispose()

Dispose(Boolean)

Disposes the object.

Declaration
protected virtual void Dispose(bool disposing)
Parameters
Type Name Description
System.Boolean disposing

true if called from System.IDisposable.Dispose; otherwise, false.

OnCompleted()

Pushes a completion notification into the subject.

Declaration
public virtual void OnCompleted()

OnError(Exception)

Pushes the specified error into the subject.

Declaration
public virtual void OnError(Exception error)
Parameters
Type Name Description
System.Exception error

Error to push into the subject.

OnNext(T)

Pushes the specified value into the subject.

Declaration
public virtual void OnNext(T value)
Parameters
Type Name Description
T value

Value to push into the subject.

Subscribe(IObserver<T>)

Subscribes the specified observer to the subject.

Declaration
public virtual ISubscription Subscribe(IObserver<T> observer)
Parameters
Type Name Description
System.IObserver<T> observer

Observer to subscribe to the subject.

Returns
Type Description
ISubscription

Subscription handle representing the observer's subscription to the subject.

Implements

IMultiSubject<T>
IMultiSubject<TInput, TOutput>
ISubscribable<T>
System.IObservable<>
System.IDisposable
System.IObserver<>
In This Article
Back to top Generated by DocFX