This class provides base functionality for a work item,
only the abstract method HandleWorkItem()()() has to be implemented to start things
| All Members | Constructors | Methods | Properties | Events | |
| Icon | Member | Description |
|---|---|---|
| BasicWorkItem()()() |
Standard constructor
| |
| BasicWorkItem(Boolean) |
Allowing to abort is disabled per default since thread aborting results in
unstable system state, see http://msdn.microsoft.com/en-us/magazine/cc163644.aspx :
[..] "I'll caution you against using Thread.Abort to control the lifetime of a thread,
especially if you have little knowledge about the implementation of the code you're
aborting. An abort inside of a critical region could spell disaster for an entire
AppDomain, and while a polite abort does signficantly reduce the window of disaster
to very tiny slivers, that one time out of 1,000 could lead to a deadlock or resource
leak or worse."
| |
| AllowAbortUponExceedingTimeLimit |
Whether to allow aborting the HandleWorkItem()()() method if the
maximum busy time exceeded. Per default this value is true.
| |
| DoWork()()() |
This method is called from HandleWorkItem()()() when the work item is processed.
May set Result if the operation returned a result
| |
| Equals(Object) | (Inherited from Object.) | |
| Finalize()()() |
Allows an Object to attempt to free resources and perform other cleanup operations before the Object is reclaimed by garbage collection.
(Inherited from Object.) | |
| GetHashCode()()() |
Serves as a hash function for a particular type.
(Inherited from Object.) | |
| GetType()()() |
Gets the Type of the current instance.
(Inherited from Object.) | |
| HandleWorkItem()()() |
Calls HandleWorkItem()()() method, then after the call to the method returns,
issues the event WorkDone if assigned
| |
| IsTerminated |
This property is set to true if the work item was terminated before
it finished processing, this may happen e.g. if
AllowAbortUponExceedingTimeLimit was true.
| |
| MemberwiseClone()()() |
Creates a shallow copy of the current Object.
(Inherited from Object.) | |
| Result |
The result of the work item
| |
| Tag |
A work item can be tagged to be distinguishable from other items
| |
| Terminate()()() |
Sets the state of the item (IsTerminated to true),
issues the Terminated event if assigned.
| |
| Terminated |
This event occurs if the item terminated before it finished processing.
IsTerminated and AllowAbortUponExceedingTimeLimit | |
| ToString()()() | (Inherited from Object.) | |
| WorkDone |
Register to this event to get notified when the
item HandleWorkItem()()() method has finished.
|
| Object | |
| BasicWorkItem | |