Skip to content

)} )} ,System.Reactive.Concurrency.IScheduler)} ,System.Reactive.Concurrency.IScheduler)}

Subject.Synchronize(ISubject) method

Defined in

Type: Subject Namespace: System.Reactive.Subjects Assembly: System.Reactive.dll

Applies to

netstandard2.0

Overloads

  • 1. public static ISubject<TSource, TResult> Synchronize<TSource, TResult>(ISubject<TSource, TResult> subject)
  • 2. public static ISubject<TSource> Synchronize<TSource>(ISubject<TSource> subject)
  • 3. public static ISubject<TSource, TResult> Synchronize<TSource, TResult>(ISubject<TSource, TResult> subject, IScheduler scheduler)
  • 4. public static ISubject<TSource> Synchronize<TSource>(ISubject<TSource> subject, IScheduler scheduler)

1. Overload

public static ISubject<TSource, TResult> Synchronize<TSource, TResult>(ISubject<TSource, TResult> subject)

Summary: Synchronizes the messages sent to the subject.

Type parameters

NameDescription
TSourceThe type of the elements received by the subject.
TResultThe type of the elements produced by the subject.

Parameters

NameTypeDescription
subject[ISubject](#The subject to synchronize.

Returns: ISubject -- Subject whose messages are synchronized.

Exceptions

TypeCondition
System.ArgumentNullExceptionsubject is null.

2. Overload

public static ISubject<TSource> Synchronize<TSource>(ISubject<TSource> subject)

Summary: Synchronizes the messages sent to the subject.

Type parameters

NameDescription
TSourceThe type of the elements received and produced by the subject.

Parameters

NameTypeDescription
subject[ISubject](#The subject to synchronize.

Returns: ISubject -- Subject whose messages are synchronized.

Exceptions

TypeCondition
System.ArgumentNullExceptionsubject is null.

3. Overload

public static ISubject<TSource, TResult> Synchronize<TSource, TResult>(ISubject<TSource, TResult> subject, IScheduler scheduler)

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

Type parameters

NameDescription
TSourceThe type of the elements received by the subject.
TResultThe type of the elements produced by the subject.

Parameters

NameTypeDescription
subject[ISubject](#The subject to synchronize.
scheduler[IScheduler](#Scheduler to notify observers on.

Returns: ISubject -- Subject whose messages are synchronized and whose observers are notified on the given scheduler.

Exceptions

TypeCondition
System.ArgumentNullExceptionsubject or scheduler is null.

4. Overload

public static ISubject<TSource> Synchronize<TSource>(ISubject<TSource> subject, IScheduler scheduler)

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

Type parameters

NameDescription
TSourceThe type of the elements received and produced by the subject.

Parameters

NameTypeDescription
subject[ISubject](#The subject to synchronize.
scheduler[IScheduler](#Scheduler to notify observers on.

Returns: ISubject -- Subject whose messages are synchronized and whose observers are notified on the given scheduler.

Exceptions

TypeCondition
System.ArgumentNullExceptionsubject or scheduler is null.