Search Results for

    Show / Hide Table of Contents

    Class Subject

    Provides a set of static methods for creating subjects.

    Inheritance
    Object
    Subject
    Inherited Members
    Object.Equals(Object)
    Object.Equals(Object, Object)
    Object.GetHashCode()
    Object.GetType()
    Object.MemberwiseClone()
    Object.ToString()
    Object.ReferenceEquals(Object, Object)
    Namespace: System.Reactive.Subjects
    Assembly: System.Reactive.Linq.dll
    Syntax
    public static class Subject

    Methods

    | Improve this Doc View Source

    Create<TSource, TResult>(IObserver<TSource>, IObservable<TResult>)

    Creates a subject from the specified observer and observable.

    Declaration
    public static ISubject<TSource, TResult> Create<TSource, TResult>(IObserver<TSource> observer, IObservable<TResult> observable)
    Parameters
    Type Name Description
    IObserver<TSource> observer

    The observer used to send messages to the subject.

    IObservable<TResult> observable

    The observable used to subscribe to messages sent from the subject.

    Returns
    Type Description
    ISubject<TSource, TResult>

    Subject implemented using the given observer and observable.

    Type Parameters
    Name Description
    TSource

    The type of the elements received by the observer.

    TResult

    The type of the elements produced by the observable sequence.

    Exceptions
    Type Condition
    ArgumentNullException

    observer or observable is null.

    | Improve this Doc View Source

    Synchronize<TSource, TResult>(ISubject<TSource, TResult>)

    Synchronizes the messages sent to the subject.

    Declaration
    public static ISubject<TSource, TResult> Synchronize<TSource, TResult>(ISubject<TSource, TResult> subject)
    Parameters
    Type Name Description
    ISubject<TSource, TResult> subject

    The subject to synchronize.

    Returns
    Type Description
    ISubject<TSource, TResult>

    Subject whose messages are synchronized.

    Type Parameters
    Name Description
    TSource

    The type of the elements received by the subject.

    TResult

    The type of the elements produced by the subject.

    Exceptions
    Type Condition
    ArgumentNullException

    subject is null.

    | Improve this Doc View Source

    Synchronize<TSource, TResult>(ISubject<TSource, TResult>, IScheduler)

    Synchronizes the messages sent to the subject and notifies observers on the specified scheduler.

    Declaration
    public static ISubject<TSource, TResult> Synchronize<TSource, TResult>(ISubject<TSource, TResult> subject, IScheduler scheduler)
    Parameters
    Type Name Description
    ISubject<TSource, TResult> subject

    The subject to synchronize.

    IScheduler scheduler

    Scheduler to notify observers on.

    Returns
    Type Description
    ISubject<TSource, TResult>

    Subject whose messages are synchronized and whose observers are notified on the given scheduler.

    Type Parameters
    Name Description
    TSource

    The type of the elements received by the subject.

    TResult

    The type of the elements produced by the subject.

    Exceptions
    Type Condition
    ArgumentNullException

    subject or scheduler is null.

    • Improve this Doc
    • View Source
    In This Article
    Back to top Generated by DocFX