C# Класс ImageGlass.ImageListView.QueuedBackgroundWorker

Наследование: System.ComponentModel.Component
Показать файл Открыть проект Примеры использования класса

Private Properties

Свойство Тип Описание
AddWork void
BuildWorkQueue void
ClearWorkQueue void
ClearWorkQueue void
CreateThreads void
GetWork int>.Utility.Tuple
IsWorkQueueEmpty bool
Run void
RunWorkerCompletedCallback void

Открытые методы

Метод Описание
CancelAsync ( ) : void

Cancels all pending operations in all queues.

CancelAsync ( int priority ) : void

Cancels all pending operations in the given queue.

CancelAsync ( object argument ) : void

Cancels processing the item with the given key.

GetApartmentState ( ) : ApartmentState

Gets the apartment state of worker threads.

Pause ( ) : void

Pauses the worker.

QueuedBackgroundWorker ( ) : System

Initializes a new instance of the QueuedBackgroundWorker class.

Resume ( ) : void

Resumes processing pending operations in the work queue.

RunWorkerAsync ( ) : void

Starts processing a new background operation.

RunWorkerAsync ( object argument ) : void

Starts processing a new background operation.

RunWorkerAsync ( object argument, int priority ) : void

Starts processing a new background operation.

RunWorkerAsync ( object argument, int priority, bool single ) : void

Starts processing a new background operation.

SetApartmentState ( ApartmentState state ) : void

Sets the apartment state of worker threads. The apartment state cannot be changed after any work is added to the work queue.

Защищенные методы

Метод Описание
Dispose ( bool disposing ) : void

Releases the unmanaged resources used by the T:System.ComponentModel.Component and optionally releases the managed resources.

OnDoWork ( ImageGlass.ImageListView.QueuedWorkerDoWorkEventArgs e ) : void

Raises the DoWork event.

OnRunWorkerCompleted ( ImageGlass.ImageListView.QueuedWorkerCompletedEventArgs e ) : void

Raises the RunWorkerCompleted event.

Приватные методы

Метод Описание
AddWork ( object argument, int priority, bool single ) : void

Adds the operation to the work queue. This method must be called from inside a lock.

BuildWorkQueue ( ) : void

Rebuilds the work queue. This method must be called from inside a lock.

ClearWorkQueue ( ) : void

Clears all work queues. This method must be called from inside a lock.

ClearWorkQueue ( int priority ) : void

Clears the work queue with the given priority. This method must be called from inside a lock.

CreateThreads ( ) : void

Creates the thread array.

GetWork ( ) : int>.Utility.Tuple

Gets a pending operation from the work queue. This method must be called from inside a lock.

IsWorkQueueEmpty ( ) : bool

Determines if the work queue is empty. This method must be called from inside a lock.

Run ( ) : void

Used by the worker thread to process items.

RunWorkerCompletedCallback ( object arg ) : void

Used to call OnRunWorkerCompleted by the synchronization context.

Описание методов

CancelAsync() публичный Метод

Cancels all pending operations in all queues.
public CancelAsync ( ) : void
Результат void

CancelAsync() публичный Метод

Cancels all pending operations in the given queue.
public CancelAsync ( int priority ) : void
priority int A value between 0 and /// indicating the priority queue to cancel.
Результат void

CancelAsync() публичный Метод

Cancels processing the item with the given key.
public CancelAsync ( object argument ) : void
argument object The argument of an asynchronous operation.
Результат void

Dispose() защищенный Метод

Releases the unmanaged resources used by the T:System.ComponentModel.Component and optionally releases the managed resources.
protected Dispose ( bool disposing ) : void
disposing bool true to release both managed and unmanaged resources; /// false to release only unmanaged resources.
Результат void

GetApartmentState() публичный Метод

Gets the apartment state of worker threads.
public GetApartmentState ( ) : ApartmentState
Результат ApartmentState

OnDoWork() защищенный Метод

Raises the DoWork event.
protected OnDoWork ( ImageGlass.ImageListView.QueuedWorkerDoWorkEventArgs e ) : void
e ImageGlass.ImageListView.QueuedWorkerDoWorkEventArgs A that contains event data.
Результат void

OnRunWorkerCompleted() защищенный Метод

Raises the RunWorkerCompleted event.
protected OnRunWorkerCompleted ( ImageGlass.ImageListView.QueuedWorkerCompletedEventArgs e ) : void
e ImageGlass.ImageListView.QueuedWorkerCompletedEventArgs A that contains event data.
Результат void

Pause() публичный Метод

Pauses the worker.
public Pause ( ) : void
Результат void

QueuedBackgroundWorker() публичный Метод

Initializes a new instance of the QueuedBackgroundWorker class.
public QueuedBackgroundWorker ( ) : System
Результат System

Resume() публичный Метод

Resumes processing pending operations in the work queue.
public Resume ( ) : void
Результат void

RunWorkerAsync() публичный Метод

Starts processing a new background operation.
public RunWorkerAsync ( ) : void
Результат void

RunWorkerAsync() публичный Метод

Starts processing a new background operation.
public RunWorkerAsync ( object argument ) : void
argument object The argument of an asynchronous operation.
Результат void

RunWorkerAsync() публичный Метод

Starts processing a new background operation.
public RunWorkerAsync ( object argument, int priority ) : void
argument object The argument of an asynchronous operation.
priority int A value between 0 and indicating the priority of this item. /// An item with a higher priority will be processed before items with lower priority.
Результат void

RunWorkerAsync() публичный Метод

Starts processing a new background operation.
public RunWorkerAsync ( object argument, int priority, bool single ) : void
argument object The argument of an asynchronous operation.
priority int A value between 0 and indicating the priority of this item. /// An item with a higher priority will be processed before items with lower priority.
single bool true to run this operation without waiting for queued items; otherwise /// false to add this operatino to th queue.
Результат void

SetApartmentState() публичный Метод

Sets the apartment state of worker threads. The apartment state cannot be changed after any work is added to the work queue.
public SetApartmentState ( ApartmentState state ) : void
state ApartmentState The new state of worker threads.
Результат void