C# Class DotNetWorkQueue.Queue.WorkerBase

The base worker class that the actual workers inherit from
Inheritance: IWorkerBase
Exibir arquivo Open project: blehnen/DotNetWorkQueue

Protected Properties

Property Type Description
WorkerThread Thread

Public Methods

Method Description
AttemptToTerminate ( ) : bool

Attempts to terminate the worker thread.

Dispose ( ) : void

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

Start ( ) : void

Starts this instance.

Stop ( ) : void

Stops this instance.

TryForceTerminate ( ) : void

Forces the worker to terminate. This method should not return until the worker has shutdown.

Protected Methods

Method Description
RaiseSystemException ( Exception error ) : void

Raises the system exception.

RaiseSystemException ( object sender, WorkerErrorEventArgs e ) : void

Raises the system exception.

RaiseSystemMessageException ( object sender, MessageErrorEventArgs e ) : void

Raises the system message exception.

RaiseUserException ( Exception error ) : void

Raises the user exception.

RaiseUserException ( object sender, WorkerErrorEventArgs e ) : void

Raises the user exception.

RaiseUserMessageException ( object sender, MessageErrorEventArgs e ) : void

Raises the user message exception.

ThrowIfDisposed ( [ name = "" ) : void

Throws an exception if this instance has been disposed.

WorkerBase ( WorkerTerminate workerTerminate ) : System

Initializes a new instance of the WorkerBase class.

Method Details

AttemptToTerminate() public method

Attempts to terminate the worker thread.
public AttemptToTerminate ( ) : bool
return bool

Dispose() public method

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

RaiseSystemException() protected method

Raises the system exception.
protected RaiseSystemException ( Exception error ) : void
error System.Exception The error.
return void

RaiseSystemException() protected method

Raises the system exception.
protected RaiseSystemException ( object sender, WorkerErrorEventArgs e ) : void
sender object The sender.
e WorkerErrorEventArgs The instance containing the event data.
return void

RaiseSystemMessageException() protected method

Raises the system message exception.
protected RaiseSystemMessageException ( object sender, MessageErrorEventArgs e ) : void
sender object The sender.
e MessageErrorEventArgs The instance containing the event data.
return void

RaiseUserException() protected method

Raises the user exception.
protected RaiseUserException ( Exception error ) : void
error System.Exception The error.
return void

RaiseUserException() protected method

Raises the user exception.
protected RaiseUserException ( object sender, WorkerErrorEventArgs e ) : void
sender object The sender.
e WorkerErrorEventArgs The instance containing the event data.
return void

RaiseUserMessageException() protected method

Raises the user message exception.
protected RaiseUserMessageException ( object sender, MessageErrorEventArgs e ) : void
sender object The sender.
e MessageErrorEventArgs The instance containing the event data.
return void

Start() public abstract method

Starts this instance.
public abstract Start ( ) : void
return void

Stop() public abstract method

Stops this instance.
public abstract Stop ( ) : void
return void

ThrowIfDisposed() protected method

Throws an exception if this instance has been disposed.
protected ThrowIfDisposed ( [ name = "" ) : void
name [ The name.
return void

TryForceTerminate() public abstract method

Forces the worker to terminate. This method should not return until the worker has shutdown.
public abstract TryForceTerminate ( ) : void
return void

WorkerBase() protected method

Initializes a new instance of the WorkerBase class.
protected WorkerBase ( WorkerTerminate workerTerminate ) : System
workerTerminate WorkerTerminate The worker terminate.
return System

Property Details

WorkerThread protected_oe property

protected Thread WorkerThread
return Thread