DevBackgroundWorker Class

A extended BackgroundWorker component with synchronous (blocking) run/cancellation support, and asynchronous pause/resume features.

Definition

Namespace: DevCase.Runtime.Threading
Assembly: DevCase.net48 (in DevCase.net48.dll) Version: 6.0.0.0 (6.0)
XMLNS for XAML: Not mapped to an xmlns.
[ToolboxBitmapAttribute(typeof(BackgroundWorker))]
[DefaultEventAttribute("DoWork")]
[HostProtectionAttribute(SecurityAction.LinkDemand, SharedState = true)]
public class DevBackgroundWorker : BackgroundWorker
Inheritance
Object    MarshalByRefObject    Component    BackgroundWorker    DevBackgroundWorker

Example

This is a code example.
C#
No code example is currently available or this language may not be supported.

Constructors

DevBackgroundWorker Initializes a new instance of the DevBackgroundWorker class.

Properties

CancellationPending Gets a value indicating whether the application has requested cancellation of a background operation.
(Inherited from BackgroundWorker)
Container Gets the IContainer that contains the Component.
(Inherited from Component)
IsBusy Gets a value indicating whether the BackgroundWorker is running an asynchronous operation.
(Inherited from BackgroundWorker)
PausePending Gets a value indicating whether the application has requested pause of a background operation.
Site Gets or sets the ISite of the Component.
(Inherited from Component)
State Gets the current state of a pending background operation.
WorkerReportsProgress Gets a value indicating whether the DevBackgroundWorker can report progress updates.
WorkerSupportsCancellation Gets a value indicating whether the DevBackgroundWorker supports asynchronous cancellation.

Methods

Cancel Requests cancellation of a pending background operation.

It blocks the caller thread until the remaining background work is canceled.

CancelAsync Asynchronously requests cancellation of a pending background operation.
CreateObjRef Creates an object that contains all the relevant information required to generate a proxy used to communicate with a remote object.
(Inherited from MarshalByRefObject)
Dispose Releases all resources used by the Component.
(Inherited from Component)
Equals Determines whether the specified object is equal to the current object.
(Inherited from Object)
GetHashCode Serves as the default hash function.
(Inherited from Object)
GetLifetimeService Retrieves the current lifetime service object that controls the lifetime policy for this instance.
(Inherited from MarshalByRefObject)
GetType Gets the Type of the current instance.
(Inherited from Object)
InitializeLifetimeService Obtains a lifetime service object to control the lifetime policy for this instance.
(Inherited from MarshalByRefObject)
Pause Pause a pending background operation.

It blocks the caller thread until the background work is resumed. To resume the background work, call the Resume method.

ReportProgress(Int32) Raises the ProgressChanged event.
(Inherited from BackgroundWorker)
ReportProgress(Int32, Object) Raises the ProgressChanged event.
(Inherited from BackgroundWorker)
RequestPause Asynchronously requests to pause a pending background operation.

To pause the background work after requesting a pause, call the Pause method.

Resume Resume a pending paused background operation.
Run Starts execution of a background operation.

It blocks the caller thread until the background work is done.

RunAsync Asynchronously starts execution of a background operation.
RunWorkerAsync Starts execution of a background operation.
(Inherited from BackgroundWorker)
RunWorkerAsync(Object) Starts execution of a background operation.
(Inherited from BackgroundWorker)
ToString Returns a String containing the name of the Component, if any. This method should not be overridden.
(Inherited from Component)

Events

Disposed Occurs when the component is disposed by a call to the Dispose method.
(Inherited from Component)
DoWork Occurs when RunWorkerAsync is called.
(Inherited from BackgroundWorker)
ProgressChanged Occurs when ReportProgress(Int32) is called.
(Inherited from BackgroundWorker)
RunWorkerCompleted Occurs when the background operation has completed, has been canceled, or has raised an exception.
(Inherited from BackgroundWorker)

Extension Methods

CanConvertTo Determines whether the source object can be converted to the specified target type.
(Defined by ObjectExtensions)
CanConvertToT Determines whether the source object can be converted to the specified target type.
(Defined by ObjectExtensions)
ConvertToT Converts an object to the specified target type.

If the conversion fails, an exception is thrown.
(Defined by ObjectExtensions)

ConvertToT Converts an object to the specified target type.

If the conversion fails, returns the specified default value.
(Defined by ObjectExtensions)

GetEvent Gets a EventInfo that match the specified event name declared in the source Component.
(Defined by ComponentExtensions)
GetEventHandlers Gets all the delegates associated to the specified event raised by the source Component.
(Defined by ComponentExtensions)
GetEvents Gets all the events declared in the source Component.
(Defined by ComponentExtensions)
GetSubscribedEvents Gets a list of events declared in the source Component that are subscribed to a event-handler.
(Defined by ComponentExtensions)
InvokeUITypeEditorT Invokes the default UITypeEditor to edit the specified property.
(Defined by ComponentExtensions)
InvokeUITypeEditorT Invokes the default UITypeEditor to edit the specified property.
(Defined by ComponentExtensions)
IsDisposable Determines whether the specified object is a disposable type (i.e., it implements IDisposable interface).
(Defined by ObjectExtensions)
Speak Speaks the string representation of the source object by using the operating system integrated text-to-speech synthesizer.
(Defined by ObjectExtensions)
Speak Speaks the string representation of the source object by using the operating system integrated text-to-speech synthesizer.
(Defined by ObjectExtensions)
ThrowIfNullTException Throws the specified exception if the source object is null.
(Defined by ObjectExtensions)
TryGetEvent Tries to get a EventInfo that match the specified event name declared in the source Component.
(Defined by ComponentExtensions)

See Also

Reference

BackgroundWorker