<PackageReference Include="System.ComponentModel.EventBasedAsync" Version="4.0.11-beta-23409" />

System.ComponentModel.BackgroundWorker

public class BackgroundWorker : IDisposable
Executes an operation on a separate thread.
public bool CancellationPending { get; }

Gets a value indicating whether the application has requested cancellation of a background operation.

public bool IsBusy { get; }

Gets a value indicating whether the BackgroundWorker is running an asynchronous operation.

public bool WorkerReportsProgress { get; set; }

Gets or sets a value indicating whether the BackgroundWorker can report progress updates.

public bool WorkerSupportsCancellation { get; set; }

Gets or sets a value indicating whether the BackgroundWorker supports asynchronous cancellation.

Occurs when RunWorkerAsync is called.

Occurs when ReportProgress is called.

Occurs when the background operation has completed, has been canceled, or has raised an exception.

Initializes a new instance of the BackgroundWorker class.

public void CancelAsync()

Requests cancellation of a pending background operation.

public void Dispose()

protected virtual void Dispose(bool disposing)

protected virtual void OnDoWork(DoWorkEventArgs e)

Raises the DoWork event.

protected virtual void OnProgressChanged(ProgressChangedEventArgs e)

Raises the ProgressChanged event.

Raises the RunWorkerCompleted event.

public void ReportProgress(int percentProgress)

Raises the ProgressChanged event.

public void ReportProgress(int percentProgress, object userState)

Raises the ProgressChanged event.

public void RunWorkerAsync()

Starts execution of a background operation.

public void RunWorkerAsync(object argument)

Starts execution of a background operation.