CSLA .NET 10.0.0
A home for your business logic
Loading...
Searching...
No Matches
Csla.Threading.BackgroundWorker Class Reference

A BackgroundWorker that wraps a System.ComponentModel.BackgroundWorkertransfers ApplicationContext.User, ClientContext, CurrentCulture and CurrentUICulture to the background thread. More...

Inheritance diagram for Csla.Threading.BackgroundWorker:

Public Member Functions

 BackgroundWorker (ApplicationContext applicationContext)
 Initializes a new instance of the BackgroundWorker class.
void CancelAsync ()
 Request cancelation of async operation.
void RunWorkerAsync ()
 Starts execution of a background operation.
void RunWorkerAsync (object? argument)
 Starts execution of a background operation.
void ReportProgress (int percentProgress)
 Calls report progress on the underlying background worker.
void ReportProgress (int percentProgress, object? userState)
 Calls report progress on the background worker.

Properties

bool IsBusy [get]
 Gets a value indicating whether the T:System.ComponentModel.BackgroundWorker is running an asynchronous operation.
bool WorkerReportsProgress [get, set]
 Gets or sets a value indicating whether the T:System.ComponentModel.BackgroundWorker can report progress updates.
bool WorkerSupportsCancellation [get, set]
 Gets or sets a value indicating whether the T:System.ComponentModel.BackgroundWorker supports asynchronous cancellation.
bool CancellationPending [get]
 Gets a value indicating whether the application has requested cancellation of a background operation.

Events

DoWorkEventHandler DoWork [add, remove]
 Occurs when M:System.ComponentModel.BackgroundWorker.RunWorkerAsync is called.
RunWorkerCompletedEventHandler RunWorkerCompleted [add, remove]
 Occurs when the background operation has completed, has been canceled, or has raised an exception.
ProgressChangedEventHandler ProgressChanged [add, remove]
 Occurs when M:System.ComponentModel.BackgroundWorker.ReportProgress is called.

Detailed Description

A BackgroundWorker that wraps a System.ComponentModel.BackgroundWorkertransfers ApplicationContext.User, ClientContext, CurrentCulture and CurrentUICulture to the background thread.

Constructor & Destructor Documentation

◆ BackgroundWorker()

Csla.Threading.BackgroundWorker.BackgroundWorker ( ApplicationContext applicationContext)
inline

Initializes a new instance of the BackgroundWorker class.

Exceptions
ArgumentNullExceptionapplicationContext is null.

Member Function Documentation

◆ CancelAsync()

void Csla.Threading.BackgroundWorker.CancelAsync ( )
inline

Request cancelation of async operation.

Exceptions
T:System.InvalidOperationExceptionP:System.ComponentModel.BackgroundWorker.WorkerSupportsCancellation is false.

◆ ReportProgress() [1/2]

void Csla.Threading.BackgroundWorker.ReportProgress ( int percentProgress)
inline

Calls report progress on the underlying background worker.

Parameters
percentProgressThe percentage, from 0 to 100, of the background operation that is complete.

◆ ReportProgress() [2/2]

void Csla.Threading.BackgroundWorker.ReportProgress ( int percentProgress,
object? userState )
inline

Calls report progress on the background worker.

Parameters
percentProgressThe percent progress.
userStateUser state object.

◆ RunWorkerAsync() [1/2]

void Csla.Threading.BackgroundWorker.RunWorkerAsync ( )
inline

Starts execution of a background operation.

Exceptions
T:System.InvalidOperationExceptionP:System.ComponentModel.BackgroundWorker.IsBusy is true.

◆ RunWorkerAsync() [2/2]

void Csla.Threading.BackgroundWorker.RunWorkerAsync ( object? argument)
inline

Starts execution of a background operation.

Parameters
argumentA parameter for use by the background operation to be executed in the E:System.ComponentModel.BackgroundWorker.DoWork event handler.
Exceptions
T:System.InvalidOperationExceptionP:System.ComponentModel.BackgroundWorker.IsBusy is true.

Property Documentation

◆ CancellationPending

bool Csla.Threading.BackgroundWorker.CancellationPending
get

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

Returns
true if the application has requested cancellation of a background operation; otherwise, false. The default is false.

◆ IsBusy

bool Csla.Threading.BackgroundWorker.IsBusy
get

Gets a value indicating whether the T:System.ComponentModel.BackgroundWorker is running an asynchronous operation.

Returns
true, if the T:System.ComponentModel.BackgroundWorker is running an asynchronous operation; otherwise, false.

◆ WorkerReportsProgress

bool Csla.Threading.BackgroundWorker.WorkerReportsProgress
getset

Gets or sets a value indicating whether the T:System.ComponentModel.BackgroundWorker can report progress updates.

Returns
true if the T:System.ComponentModel.BackgroundWorker supports progress updates; otherwise false. The default is false.

◆ WorkerSupportsCancellation

bool Csla.Threading.BackgroundWorker.WorkerSupportsCancellation
getset

Gets or sets a value indicating whether the T:System.ComponentModel.BackgroundWorker supports asynchronous cancellation.

Returns
true if the T:System.ComponentModel.BackgroundWorker supports cancellation; otherwise false. The default is false.

Event Documentation

◆ DoWork

DoWorkEventHandler Csla.Threading.BackgroundWorker.DoWork
addremove

Occurs when M:System.ComponentModel.BackgroundWorker.RunWorkerAsync is called.

◆ ProgressChanged

ProgressChangedEventHandler Csla.Threading.BackgroundWorker.ProgressChanged
addremove

Occurs when M:System.ComponentModel.BackgroundWorker.ReportProgress is called.

◆ RunWorkerCompleted

RunWorkerCompletedEventHandler Csla.Threading.BackgroundWorker.RunWorkerCompleted
addremove

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


The documentation for this class was generated from the following file: