Skip to content

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

Observer.ToProgress(IObserver) method

Defined in

Type: Observer Namespace: System.Reactive Assembly: System.Reactive.dll

Applies to

netstandard2.0

Overloads

  • 1. public static IProgress<T> ToProgress<T>(this IObserver<T> observer)
  • 2. public static IProgress<T> ToProgress<T>(this IObserver<T> observer, IScheduler scheduler)

1. Overload

public static IProgress<T> ToProgress<T>(this IObserver<T> observer)

Summary: Converts an observer to a progress object.

Type parameters

NameDescription
TThe type of the progress objects received by the source observer.

Parameters

NameTypeDescription
observerIObserverThe observer to convert.

Returns: IProgress -- Progress object whose Report messages correspond to the observer's OnNext messages.

Exceptions

TypeCondition
System.ArgumentNullExceptionobserver is null.

2. Overload

public static IProgress<T> ToProgress<T>(this IObserver<T> observer, IScheduler scheduler)

Summary: Converts an observer to a progress object, using the specified scheduler to invoke the progress reporting method.

Type parameters

NameDescription
TThe type of the progress objects received by the source observer.

Parameters

NameTypeDescription
observerIObserverThe observer to convert.
scheduler[IScheduler](#Scheduler to report progress on.

Returns: IProgress -- Progress object whose Report messages correspond to the observer's OnNext messages.

Exceptions

TypeCondition
System.ArgumentNullExceptionobserver or scheduler is null.