public class ProcessQueue<T> : IList<T>,
ICollection<T>, IEnumerable<T>, IEnumerable, IProvideStatus, ISupportLifecycle,
IDisposable
Public Class ProcessQueue(Of T)
Implements IList(Of T), ICollection(Of T),
IEnumerable(Of T), IEnumerable, IProvideStatus, ISupportLifecycle, IDisposable
generic<typename T>
public ref class ProcessQueue : IList<T>,
ICollection<T>, IEnumerable<T>, IEnumerable, IProvideStatus, ISupportLifecycle,
IDisposable
This class acts as a strongly-typed collection of objects to be processed.
Note that the ProcessQueueT will not start processing until the Start method is called.
CancellationToken | Gets the per processing thread cancellation token to check when a ProcessTimeout is specified. |
CanProcessItemFunction | Gets or sets the user function determining if an item is ready to be processed. |
Count | Gets the number of elements actually contained in the ProcessQueueT. |
CurrentStatistics | Gets the current run-time statistics of the ProcessQueueT as a single group of values. |
Enabled | Gets or sets indicator that the ProcessQueueT is currently enabled. |
InternalEnumerable | Allows derived classes to access the interfaced internal ProcessQueueT directly. |
InternalList | Gets the internal list for direct use by ProcessQueueT. |
IsDisposed | Gets a flag that indicates whether the object has been disposed. |
IsEmpty | Gets a value that indicates whether the ProcessQueueT is empty. |
IsProcessing | Gets indicator that the ProcessQueueT is actively processing items. |
IsReadOnly | Gets a value indicating whether the ProcessQueueT is read-only. |
IsSynchronized | Gets a value indicating whether access to the ProcessQueueT is synchronized (thread safe). Always returns true for ProcessQueueT. |
Item | Gets or sets the element at the specified index. |
ItemsBeingProcessed | Gets the total number of items currently being processed. |
MaximumThreads | Gets or sets the maximum number of threads to process simultaneously. |
Name | Gets or sets name for this ProcessQueueT. |
ProcessingIsRealTime | Gets indicator that items will be processed in real-time. |
ProcessingStyle | Gets the item QueueProcessingStyle for the ProcessQueueT (i.e., one at a time or many at once). |
ProcessInterval | Gets or sets the interval, in milliseconds, on which new items begin processing. |
ProcessItemFunction | Gets or sets the user function for processing individual items in the ProcessQueueT one at a time. |
ProcessItemsFunction | Gets or sets the user function for processing multiple items in the ProcessQueueT at once. |
ProcessTimeout | Gets or sets the maximum time, in milliseconds, allowed for processing an item. |
RequeueModeOnException | Gets or sets the mode of insertion used (prefix or suffix) when at item is placed back into the ProcessQueueT after an exception occurs while processing. |
RequeueModeOnTimeout | Gets or sets the mode of insertion used (prefix or suffix) when at item is placed back into the ProcessQueueT after processing times out. |
RequeueOnException | Gets or sets whether or not to automatically place an item back into the ProcessQueueT if an exception occurs while processing. |
RequeueOnTimeout | Gets or sets whether or not to automatically place an item back into the ProcessQueueT if the processing times out. |
RunTime | Gets the total amount of time, in seconds, that the ProcessQueueT has been active. |
Status | Gets current status of ProcessQueueT. |
SynchronizedOperationType | Gets or sets the type of synchronized operation used to process items in a real-time ProcessQueueT. |
SyncRoot | Gets an object that can be used to synchronize access to the ProcessQueueT. |
ThreadCount | Gets the current number of active threads. |
ThreadingMode | Gets the current QueueThreadingMode for the ProcessQueueT (i.e., synchronous or asynchronous). |
TotalFunctionCalls | Gets the total number of calls to ProcessItemFunction or ProcessItemsFunction. |
TotalProcessedItems | Gets the total number of items processed so far. |
Add | Adds an item to the ProcessQueueT. |
AddRange | Adds the elements of the specified collection to the end of the ProcessQueueT. |
BinarySearch(T) | Searches the entire sorted ProcessQueueT, using a binary search algorithm, for an element using the default comparer and returns the zero-based index of the element. |
BinarySearch(T, IComparerT) | Searches the entire sorted ProcessQueueT, using a binary search algorithm, for an element using the specified comparer and returns the zero-based index of the element. |
BinarySearch(Int32, Int32, T, IComparerT) | Searches a range of elements in the sorted ProcessQueueT, using a binary search algorithm, for an element using the specified comparer and returns the zero-based index of the element. |
CanProcessItem | Determines if an item can be processed. |
CanProcessItems | Determines if all items can be processed. |
Clear | Removes all elements from the ProcessQueueT. |
Contains | Determines whether an element is in the ProcessQueueT. |
ConvertAllTOutput | Converts the elements in the current ProcessQueueT to another type, and returns a ProcessQueueT containing the converted elements. |
CopyTo | Copies the entire ProcessQueueT to a compatible one-dimensional array, starting at the beginning of the target array. |
CreateAsynchronousQueue(ProcessQueueTProcessItemFunctionSignature) | Creates a new asynchronous ProcessQueueT with the default settings: ProcessInterval = 100, MaximumThreads = 5, ProcessTimeout = Infinite, RequeueOnTimeout = False, RequeueOnException = False. |
CreateAsynchronousQueue(ProcessQueueTProcessItemsFunctionSignature) | Creates a new asynchronous, bulk item ProcessQueueT with the default settings: ProcessInterval = 100, MaximumThreads = 5, ProcessTimeout = Infinite, RequeueOnTimeout = False, RequeueOnException = False. |
CreateAsynchronousQueue(ProcessQueueTProcessItemFunctionSignature, ProcessQueueTCanProcessItemFunctionSignature) | Creates a new asynchronous ProcessQueueT with the default settings: ProcessInterval = 100, MaximumThreads = 5, ProcessTimeout = Infinite, RequeueOnTimeout = False, RequeueOnException = False. |
CreateAsynchronousQueue(ProcessQueueTProcessItemFunctionSignature, Int32) | Creates a new asynchronous ProcessQueueT with the default settings: ProcessInterval = 100, ProcessTimeout = Infinite, RequeueOnTimeout = False, RequeueOnException = False. |
CreateAsynchronousQueue(ProcessQueueTProcessItemsFunctionSignature, ProcessQueueTCanProcessItemFunctionSignature) | Creates a new asynchronous, bulk item ProcessQueueT with the default settings: ProcessInterval = 100, MaximumThreads = 5, ProcessTimeout = Infinite, RequeueOnTimeout = False, RequeueOnException = False. |
CreateAsynchronousQueue(ProcessQueueTProcessItemsFunctionSignature, Int32) | Creates a new asynchronous, bulk item ProcessQueueT with the default settings: ProcessInterval = 100, ProcessTimeout = Infinite, RequeueOnTimeout = False, RequeueOnException = False. |
CreateAsynchronousQueue(ProcessQueueTProcessItemFunctionSignature, ProcessQueueTCanProcessItemFunctionSignature, Int32) | Creates a new asynchronous ProcessQueueT with the default settings: ProcessInterval = 100, ProcessTimeout = Infinite, RequeueOnTimeout = False, RequeueOnException = False. |
CreateAsynchronousQueue(ProcessQueueTProcessItemsFunctionSignature, ProcessQueueTCanProcessItemFunctionSignature, Int32) | Creates a new asynchronous, bulk item ProcessQueueT with the default settings: ProcessInterval = 100, ProcessTimeout = Infinite, RequeueOnTimeout = False, RequeueOnException = False. |
CreateAsynchronousQueue(ProcessQueueTProcessItemFunctionSignature, Double, Int32, Int32, Boolean, Boolean) | Creates a new asynchronous ProcessQueueT using specified settings. |
CreateAsynchronousQueue(ProcessQueueTProcessItemsFunctionSignature, Double, Int32, Int32, Boolean, Boolean) | Creates a new asynchronous, bulk item ProcessQueueT using specified settings. |
CreateAsynchronousQueue(ProcessQueueTProcessItemFunctionSignature, ProcessQueueTCanProcessItemFunctionSignature, Double, Int32, Int32, Boolean, Boolean) | Creates a new asynchronous ProcessQueueT using specified settings. |
CreateAsynchronousQueue(ProcessQueueTProcessItemsFunctionSignature, ProcessQueueTCanProcessItemFunctionSignature, Double, Int32, Int32, Boolean, Boolean) | Creates a new asynchronous, bulk item ProcessQueueT using specified settings. |
CreateRealTimeQueue(ProcessQueueTProcessItemFunctionSignature) | Creates a new real-time ProcessQueueT with the default settings: ProcessTimeout = Infinite, RequeueOnTimeout = False, RequeueOnException = False. |
CreateRealTimeQueue(ProcessQueueTProcessItemsFunctionSignature) | Creates a new real-time, bulk item ProcessQueueT with the default settings: ProcessTimeout = Infinite, RequeueOnTimeout = False, RequeueOnException = False. |
CreateRealTimeQueue(ProcessQueueTProcessItemFunctionSignature, ProcessQueueTCanProcessItemFunctionSignature) | Creates a new real-time ProcessQueueT with the default settings: ProcessTimeout = Infinite, RequeueOnTimeout = False, RequeueOnException = False. |
CreateRealTimeQueue(ProcessQueueTProcessItemsFunctionSignature, ProcessQueueTCanProcessItemFunctionSignature) | Creates a new real-time, bulk item ProcessQueueT with the default settings: ProcessTimeout = Infinite, RequeueOnTimeout = False, RequeueOnException = False. |
CreateRealTimeQueue(ProcessQueueTProcessItemFunctionSignature, Int32, Boolean, Boolean) | Creates a new real-time ProcessQueueT using specified settings. |
CreateRealTimeQueue(ProcessQueueTProcessItemsFunctionSignature, Int32, Boolean, Boolean) | Creates a new real-time, bulk item ProcessQueueT using specified settings. |
CreateRealTimeQueue(ProcessQueueTProcessItemFunctionSignature, ProcessQueueTCanProcessItemFunctionSignature, Int32, Boolean, Boolean) | Creates a new real-time ProcessQueueT using specified settings. |
CreateRealTimeQueue(ProcessQueueTProcessItemsFunctionSignature, ProcessQueueTCanProcessItemFunctionSignature, Int32, Boolean, Boolean) | Creates a new real-time, bulk item ProcessQueueT using specified settings. |
CreateSynchronousQueue(ProcessQueueTProcessItemFunctionSignature) | Creates a new synchronous ProcessQueueT (i.e., single process thread) with the default settings: ProcessInterval = 100, ProcessTimeout = Infinite, RequeueOnTimeout = False, RequeueOnException = False. |
CreateSynchronousQueue(ProcessQueueTProcessItemsFunctionSignature) | Creates a new synchronous, bulk item ProcessQueueT (i.e., single process thread) with the default settings: ProcessInterval = 100, ProcessTimeout = Infinite, RequeueOnTimeout = False, RequeueOnException = False. |
CreateSynchronousQueue(ProcessQueueTProcessItemFunctionSignature, ProcessQueueTCanProcessItemFunctionSignature) | Creates a new synchronous ProcessQueueT (i.e., single process thread) with the default settings: ProcessInterval = 100, ProcessTimeout = Infinite, RequeueOnTimeout = False, RequeueOnException = False. |
CreateSynchronousQueue(ProcessQueueTProcessItemsFunctionSignature, ProcessQueueTCanProcessItemFunctionSignature) | Creates a new synchronous, bulk item ProcessQueueT (i.e., single process thread) with the default settings: ProcessInterval = 100, ProcessTimeout = Infinite, RequeueOnTimeout = False, RequeueOnException = False. |
CreateSynchronousQueue(ProcessQueueTProcessItemFunctionSignature, Double, Int32, Boolean, Boolean) | Creates a new synchronous ProcessQueueT (i.e., single process thread) using specified settings. |
CreateSynchronousQueue(ProcessQueueTProcessItemsFunctionSignature, Double, Int32, Boolean, Boolean) | Creates a new synchronous, bulk item ProcessQueueT (i.e., single process thread) using specified settings. |
CreateSynchronousQueue(ProcessQueueTProcessItemFunctionSignature, ProcessQueueTCanProcessItemFunctionSignature, Double, Int32, Boolean, Boolean) | Creates a new synchronous ProcessQueueT (i.e., single process thread) using specified settings. |
CreateSynchronousQueue(ProcessQueueTProcessItemsFunctionSignature, ProcessQueueTCanProcessItemFunctionSignature, Double, Int32, Boolean, Boolean) | Creates a new synchronous, bulk item ProcessQueueT (i.e., single process thread) using specified settings. |
DataAdded | Notifies queue that data was added and/or modified, so it can begin processing data. |
Dispose | Releases all the resources used by the ProcessQueueT object. |
Dispose(Boolean) | Releases the unmanaged resources used by the ProcessQueueT object and optionally releases the managed resources. |
Equals | Determines whether the specified object is equal to the current object. (Inherited from Object) |
Exists | Determines whether the ProcessQueueT contains elements that match the conditions defined by the specified predicate. |
Finalize |
Releases the unmanaged resources before the ProcessQueueT object is reclaimed by GC.
(Overrides ObjectFinalize) |
Find | Searches for an element that matches the conditions defined by the specified predicate, and returns the first occurrence within the entire ProcessQueueT. |
FindAll | Retrieves all elements that match the conditions defined by the specified predicate. |
FindIndex(PredicateT) | Searches for an element that matches the conditions defined by the specified predicate, and returns the zero-based index of the first occurrence within the range of elements in the ProcessQueueT that extends from the specified index to the last element. |
FindIndex(Int32, PredicateT) | Searches for an element that matches the conditions defined by the specified predicate, and returns the zero-based index of the first occurrence within the range of elements in the ProcessQueueT that extends from the specified index to the last element. |
FindIndex(Int32, Int32, PredicateT) | Searches for an element that matches the conditions defined by the specified predicate, and returns the zero-based index of the first occurrence within the range of elements in the ProcessQueueT that extends from the specified index to the last element. |
FindLast | Searches for an element that matches the conditions defined by the specified predicate, and returns the last occurrence within the entire ProcessQueueT. |
FindLastIndex(PredicateT) | Searches for an element that matches the conditions defined by the specified predicate, and returns the zero-based index of the last occurrence within the entire ProcessQueueT. |
FindLastIndex(Int32, PredicateT) | Searches for an element that matches the conditions defined by the specified predicate, and returns the zero-based index of the last occurrence within the range of elements in the ProcessQueueT that extends from the first element to the specified index. |
FindLastIndex(Int32, Int32, PredicateT) | Searches for an element that matches the conditions defined by the specified predicate, and returns the zero-based index of the last occurrence within the range of elements in the ProcessQueueT that contains the specified number of elements and ends at the specified index. |
Flush | Blocks the current thread, if the ProcessQueueT is active (i.e., user has called "Start" method), until all items in ProcessQueueT are processed, and then stops the ProcessQueueT. |
ForEach | Performs the specified action on each element of the ProcessQueueT. |
GetEnumerator | Returns an enumerator that iterates through the ProcessQueueT. |
GetHashCode | Serves as the default hash function. (Inherited from Object) |
GetRange | Creates a shallow copy of a range of elements in the source ProcessQueueT. |
GetType | Gets the Type of the current instance. (Inherited from Object) |
IndexOf(T) | Searches for the specified object and returns the zero-based index of the first occurrence within the entire ProcessQueueT. |
IndexOf(T, Int32) | Searches for the specified object and returns the zero-based index of the first occurrence within the range of elements in the ProcessQueueT that extends from the specified index to the last element. |
IndexOf(T, Int32, Int32) | Searches for the specified object and returns the zero-based index of the first occurrence within the range of elements in the ProcessQueueT that starts at the specified index and contains the specified number of elements. |
Insert | Inserts an element into the ProcessQueueT at the specified index. |
InsertRange | Inserts the elements of a collection into the ProcessQueueT at the specified index. |
LastIndexOf(T) | Searches for the specified object and returns the zero-based index of the last occurrence within the entire ProcessQueueT. |
LastIndexOf(T, Int32) | Searches for the specified object and returns the zero-based index of the last occurrence within the range of elements in the ProcessQueueT that extends from the first element to the specified index. |
LastIndexOf(T, Int32, Int32) | Searches for the specified object and returns the zero-based index of the last occurrence within the range of elements in the ProcessQueueT that contains the specified number of elements and ends at the specified index. |
MemberwiseClone | Creates a shallow copy of the current Object. (Inherited from Object) |
OnItemProcessed | Raises the base class ItemProcessed event. |
OnItemsProcessed | Raises the base class ItemsProcessed event. |
OnItemsTimedOut | Raises the base class ItemsTimedOut event. |
OnItemTimedOut | Raises the base class ItemTimedOut event. |
OnProcessException | Raises the base class ProcessException event. |
Remove | Removes the first occurrence of a specific object from the ProcessQueueT. |
RemoveAll | Removes the all the elements that match the conditions defined by the specified predicate. |
RemoveAt | Removes the element at the specified index of the ProcessQueueT. |
RemoveRange | Removes a range of elements from the ProcessQueueT. |
RequeueItem | Requeues item into ProcessQueueT according to specified requeue reason. |
RequeueItems | Requeues items into ProcessQueueT according to specified requeue reason. |
Reverse | Reverses the order of the elements in the entire ProcessQueueT. |
Reverse(Int32, Int32) | Reverses the order of the elements in the specified range. |
SignalDataModified | Manually signals that data has been modified and processing should resume. |
Sort | Sorts the elements in the entire ProcessQueueT, using the default comparer. |
Sort(ComparisonT) | Sorts the elements in the entire ProcessQueueT, using the specified comparison. |
Sort(IComparerT) | Sorts the elements in the entire ProcessQueueT, using the specified comparer. |
Sort(Int32, Int32, IComparerT) | Sorts the elements in a range of elements in the ProcessQueueT, using the specified comparer. |
Start | Starts item processing. |
Stop | Stops item processing. |
ToArray | Copies the elements contained in the ProcessQueueT to a new array. |
ToString | Returns a string that represents the current object. (Inherited from Object) |
TrueForAll | Determines whether every element in the ProcessQueueT matches the conditions defined by the specified predicate. |
TryTake(T) | Attempts to remove and return an object from the ProcessQueueT. |
TryTake(T) | Attempts to remove and return all objects from the ProcessQueueT. |
Disposed | Occurs when the class has been disposed. |
ItemProcessed | Event that is raised after an item has been successfully processed. |
ItemsProcessed | Event that is raised after an array of items have been successfully processed. |
ItemsTimedOut | Event that is raised if the processing time for an array of items exceeds the specified process timeout. |
ItemTimedOut | Event that is raised if an item's processing time exceeds the specified process timeout. |
ProcessException | Event that is raised if an exception is encountered while attempting to processing an item in the ProcessQueueT. |
DefaultMaximumThreads | Default maximum number of processing threads. |
DefaultProcessInterval | Default processing interval (in milliseconds). |
DefaultProcessTimeout | Default processing timeout (in milliseconds). |
DefaultRequeueModeOnException | Default setting for requeuing mode on processing exceptions. |
DefaultRequeueModeOnTimeout | Default setting for requeuing mode on processing timeout. |
DefaultRequeueOnException | Default setting for requeuing items on processing exceptions. |
DefaultRequeueOnTimeout | Default setting for requeuing items on processing timeout. |
RealTimeProcessInterval | Default real-time processing interval (in milliseconds). |