C# Class DotNetWorkQueue.Queue.WorkerCollection

Contains a collection of IWorker
Does not contain IPrimaryWorker
Inheritance: IWorkerCollection
Exibir arquivo Open project: blehnen/DotNetWorkQueue

Public Methods

Method Description
Dispose ( ) : void

Performs application-defined tasks associated with freeing, releasing, or resetting unmanaged resources.

PauseWorkers ( ) : void

Pauses all workers. Call ResumeWorkers to resume looking for work.

ResumeWorkers ( ) : void

Resumes all workers. Call PauseWorkers to pause looking for work

Start ( ) : void

Starts all workers.

Stop ( ) : void

Stops all workers.

WorkerCollection ( IWorkerConfiguration workerConfiguration, IWorkerFactory workerFactory, StopWorker stopWorker, ILogFactory log, IWorkerWaitForEventOrCancel workerPause ) : System

Initializes a new instance of the WorkerCollection class.

Protected Methods

Method Description
Dispose ( bool disposing ) : void

Releases unmanaged and - optionally - managed resources.

Private Methods

Method Description
AddWorker ( ) : void

Adds a new worker.

CreateWorkers ( ) : void

Creates the workers

RaiseSystemException ( object sender, WorkerErrorEventArgs e ) : void

Raises the system exception.

RaiseUserException ( object sender, WorkerErrorEventArgs e ) : void

Raises the user exception.

Method Details

Dispose() public method

Performs application-defined tasks associated with freeing, releasing, or resetting unmanaged resources.
public Dispose ( ) : void
return void

Dispose() protected method

Releases unmanaged and - optionally - managed resources.
protected Dispose ( bool disposing ) : void
disposing bool true to release both managed and unmanaged resources; false to release only unmanaged resources.
return void

PauseWorkers() public method

Pauses all workers. Call ResumeWorkers to resume looking for work.
public PauseWorkers ( ) : void
return void

ResumeWorkers() public method

Resumes all workers. Call PauseWorkers to pause looking for work
public ResumeWorkers ( ) : void
return void

Start() public method

Starts all workers.
Start must only be called once
public Start ( ) : void
return void

Stop() public method

Stops all workers.
public Stop ( ) : void
return void

WorkerCollection() public method

Initializes a new instance of the WorkerCollection class.
public WorkerCollection ( IWorkerConfiguration workerConfiguration, IWorkerFactory workerFactory, StopWorker stopWorker, ILogFactory log, IWorkerWaitForEventOrCancel workerPause ) : System
workerConfiguration IWorkerConfiguration The worker configuration.
workerFactory IWorkerFactory The worker factory.
stopWorker StopWorker The stop worker.
log ILogFactory The log.
workerPause IWorkerWaitForEventOrCancel The worker pause.
return System