Class SimpleQueueWorker<T>
Worker for running various simple asynchronous actions.
public abstract class SimpleQueueWorker<T> : ThreadQueueWorker<SimpleQueueItem, T> where T : SimpleQueueWorker<T>, new()
  Type Parameters
T
- Inheritance
 - 
      objectThreadWorker<T>SimpleQueueWorker<T>
 
- Inherited Members
 
- Extension Methods
 
Remarks
Duplicity of items being enqueued is checks by Key.
Constructors
SimpleQueueWorker()
protected SimpleQueueWorker()
  Properties
DefaultInterval
Default interval of processing cycle.
protected override int DefaultInterval { get; }
  Property Value
- int
 
MaintenanceInterval
Maintenance interval for turning off the thread.
protected override int MaintenanceInterval { get; }
  Property Value
- int
 
Methods
DoMaintenance()
Turns off thread in case of inactivity.
protected override void DoMaintenance()
  Enqueue(Action)
Enqueue action with random unique key.
public void Enqueue(Action action)
  Parameters
actionActionAction to be enqueued.
Enqueue(string, Action)
Enqueue action with given key.
public void Enqueue(string key, Action action)
  Parameters
keystringAction key.
actionActionAction to be enqueued.
Finish()
Finishes the worker process.
protected override void Finish()
  Initialize()
Initialize item counter event.
protected override void Initialize()
  ProcessItem(SimpleQueueItem)
Processing of single action.
protected override void ProcessItem(SimpleQueueItem item)
  Parameters
itemSimpleQueueItemItem to be processed.