This project has moved. For the latest updates, please go here.

Overview

ObserverProgress is an IProgress<T> implementation that sends progress reports to an observer.

Note that ObserverProgress is in the Nito.AsyncEx.ObserverProgress.nuget package, and is installed as source into your target project.

ObserverProgress also supports ObserveTaskForCompletion, which will complete the event stream (via OnError or OnCompleted) when the Task completes.

API

// A progress implementation that sends progress reports to an observer stream.
// Optionally ends the stream when the task completes.
internal sealed class ObserverProgress<T> : IProgress<T>
{
  // Initializes a new instance of the ObserverProgress<T> class.
  public ObserverProgress(IObserver<T> observer);

  // Watches the task, and completes the observer when the task completes.
  public void ObserveTaskForCompletion(Task task);
}

Last edited Nov 17, 2012 at 2:30 PM by StephenCleary, version 1

Comments

No comments yet.