Process
|
public class ProcessDictionary<TKey, TValue> : ProcessQueue<KeyValuePair<TKey, TValue>>, IDictionary<TKey, TValue>, ICollection<KeyValuePair<TKey, TValue>>, IEnumerable<KeyValuePair<TKey, TValue>>, IEnumerable
The ProcessDictionaryTKey, TValue type exposes the following members.
Name | Description | |
---|---|---|
CancellationToken |
Gets the per processing thread cancellation token to check when a ProcessTimeout is specified.
(Inherited from ProcessQueueT) | |
CanProcessItemFunction | Gets or sets the user function used to determine if an item is ready to be processed. | |
Count | Gets the number of elements actually contained in the ProcessQueueT. (Inherited from ProcessQueueT) | |
CurrentStatistics |
Gets the current run-time statistics of the ProcessQueueT as a single group of values.
(Inherited from ProcessQueueT) | |
Enabled |
Gets or sets indicator that the ProcessQueueT is currently enabled.
(Inherited from ProcessQueueT) | |
InternalDictionary | Gets the internal sorted dictionary for direct use by derived classes. | |
InternalEnumerable |
Allows derived classes to access the interfaced internal ProcessQueueT directly.
(Inherited from ProcessQueueT) | |
InternalList |
Gets the internal list for direct use by ProcessQueueT.
(Inherited from ProcessQueueT) | |
IsDisposed |
Gets a flag that indicates whether the object has been disposed.
(Inherited from ProcessQueueT) | |
IsEmpty |
Gets a value that indicates whether the ProcessQueueT is empty.
(Inherited from ProcessQueueT) | |
IsProcessing |
Gets indicator that the ProcessQueueT is actively processing items.
(Inherited from ProcessQueueT) | |
IsReadOnly | Gets a value indicating whether the ProcessQueueT is read-only. (Inherited from ProcessQueueT) | |
IsSynchronized | Gets a value indicating whether access to the ProcessQueueT is synchronized (thread safe). Always returns true for ProcessQueueT. (Inherited from ProcessQueueT) | |
ItemInt32 |
Gets or sets the element at the specified index.
(Inherited from ProcessQueueT) | |
ItemTKey | Gets or sets the value associated with the specified key. | |
ItemsBeingProcessed |
Gets the total number of items currently being processed.
(Inherited from ProcessQueueT) | |
Keys | Gets an ICollection containing the keys of the ProcessDictionaryTKey, TValue. | |
MaximumThreads |
Gets or sets the maximum number of threads to process simultaneously.
(Inherited from ProcessQueueT) | |
Name |
Gets the class name.
(Overrides ProcessQueueTName) | |
ProcessingIsRealTime |
Gets indicator that items will be processed in real-time.
(Inherited from ProcessQueueT) | |
ProcessingStyle |
Gets the item QueueProcessingStyle for the ProcessQueueT (i.e., one at a time or many at once).
(Inherited from ProcessQueueT) | |
ProcessInterval |
Gets or sets the interval, in milliseconds, on which new items begin processing.
(Inherited from ProcessQueueT) | |
ProcessItemFunction | Gets or sets the user function used to process items in the list one at a time. | |
ProcessItemsFunction |
Gets or sets the user function used to process multiple items in the list at once.
(Overrides ProcessQueueTProcessItemsFunction) | |
ProcessTimeout |
Gets or sets the maximum time, in milliseconds, allowed for processing an item.
(Inherited from ProcessQueueT) | |
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.
(Inherited from ProcessQueueT) | |
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.
(Inherited from ProcessQueueT) | |
RequeueOnException |
Gets or sets whether or not to automatically place an item back into the ProcessQueueT if an exception occurs
while processing.
(Inherited from ProcessQueueT) | |
RequeueOnTimeout |
Gets or sets whether or not to automatically place an item back into the ProcessQueueT if the processing times out.
(Inherited from ProcessQueueT) | |
RunTime |
Gets the total amount of time, in seconds, that the ProcessQueueT has been active.
(Inherited from ProcessQueueT) | |
Status |
Gets current status of ProcessQueueT.
(Inherited from ProcessQueueT) | |
SynchronizedOperationType |
Gets or sets the type of synchronized operation used to process items in a real-time ProcessQueueT.
(Inherited from ProcessQueueT) | |
SyncRoot |
Gets an object that can be used to synchronize access to the ProcessQueueT.
(Inherited from ProcessQueueT) | |
ThreadCount |
Gets the current number of active threads.
(Inherited from ProcessQueueT) | |
ThreadingMode |
Gets the current QueueThreadingMode for the ProcessQueueT (i.e., synchronous or asynchronous).
(Inherited from ProcessQueueT) | |
TotalFunctionCalls |
Gets the total number of calls to ProcessItemFunction or ProcessItemsFunction.
(Inherited from ProcessQueueT) | |
TotalProcessedItems |
Gets the total number of items processed so far.
(Inherited from ProcessQueueT) | |
Values | Gets an ICollection containing the values of the ProcessDictionaryTKey, TValue. |
Name | Description | |
---|---|---|
Add(T) | Adds an item to the ProcessQueueT. (Inherited from ProcessQueueT) | |
Add(TKey, TValue) | Adds an element with the provided key and value to the ProcessDictionaryTKey, TValue. | |
AddOrUpdate(TKey, TValue) | Adds a key/value pair to the ProcessDictionaryTKey, TValue if the key does not already exist, or updates a key/value pair in the ProcessDictionaryTKey, TValue if the key already exists. | |
AddOrUpdate(TKey, FuncTKey, TValue) | Adds a key/value pair to the ProcessDictionaryTKey, TValue if the key does not already exist, or updates a key/value pair in the ProcessDictionaryTKey, TValue if the key already exists. | |
AddOrUpdate(TKey, TValue, FuncTKey, TValue, TValue) | Adds a key/value pair to the ProcessDictionaryTKey, TValue if the key does not already exist, or updates a key/value pair in the ProcessDictionaryTKey, TValue if the key already exists. | |
AddOrUpdate(TKey, FuncTKey, TValue, FuncTKey, TValue, TValue) | Adds a key/value pair to the ProcessDictionaryTKey, TValue if the key does not already exist, or updates a key/value pair in the ProcessDictionaryTKey, TValue if the key already exists. | |
AddRange |
Adds the elements of the specified collection to the end of the ProcessQueueT.
(Inherited from ProcessQueueT) | |
BinarySearch(KeyValuePairTKey, TValue) |
This function doesn't have the same meaning in the ProcessDictionaryTKey, TValue as it does in
ProcessQueueT, so it is marked as hidden from the editor. However it returns
IndexOfKey(TKey) so that it returns a value that at least makes sense
in case it gets called.
(Overrides ProcessQueueTBinarySearch(T)) | |
BinarySearch(KeyValuePairTKey, TValue, IComparerKeyValuePairTKey, TValue) |
This function doesn't have the same meaning in the ProcessDictionaryTKey, TValue as it does in
ProcessQueueT, so it is marked as hidden from the editor. However it returns
IndexOfKey(TKey) so that it returns a value that at least makes sense
in case it gets called.
(Overrides ProcessQueueTBinarySearch(T, IComparerT)) | |
BinarySearch(Int32, Int32, KeyValuePairTKey, TValue, IComparerKeyValuePairTKey, TValue) |
This function doesn't have the same meaning in the ProcessDictionaryTKey, TValue as it does in
ProcessQueueT, so it is marked as hidden from the editor. However it returns
IndexOfKey(TKey) so that it returns a value that at least makes sense
in case it gets called.
(Overrides ProcessQueueTBinarySearch(Int32, Int32, T, IComparerT)) | |
CanProcessItem |
Determines if an item can be processed.
(Inherited from ProcessQueueT) | |
CanProcessItems |
Determines if all items can be processed.
(Inherited from ProcessQueueT) | |
Clear |
Removes all elements from the ProcessQueueT.
(Inherited from ProcessQueueT) | |
Contains |
Determines whether an element is in the ProcessQueueT.
(Inherited from ProcessQueueT) | |
ContainsKey | Determines whether the ProcessDictionaryTKey, TValue contains an element with the specified key. | |
ContainsValue | Determines whether the ProcessDictionaryTKey, TValue contains an element with the specified value. | |
ConvertAllTOutput | Converts the elements in the current ProcessQueueT to another type, and returns a ProcessQueueT containing the
converted elements. (Inherited from ProcessQueueT) | |
CopyTo | Copies the entire ProcessQueueT to a compatible one-dimensional array, starting at the beginning of the
target array. (Inherited from ProcessQueueT) | |
DataAdded |
Notifies queue that data was added and/or modified, so it can begin processing data.
(Inherited from ProcessQueueT) | |
Dispose |
Releases all the resources used by the ProcessQueueT object.
(Inherited from ProcessQueueT) | |
Dispose(Boolean) |
Releases the unmanaged resources used by the ProcessDictionaryTKey, TValue object and optionally releases the managed resources.
(Overrides ProcessQueueTDispose(Boolean)) | |
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. (Inherited from ProcessQueueT) | |
Finalize |
Releases the unmanaged resources before the ProcessQueueT object is reclaimed by GC.
(Inherited from ProcessQueueT) | |
Find | Searches for an element that matches the conditions defined by the specified predicate, and returns
the first occurrence within the entire ProcessQueueT. (Inherited from ProcessQueueT) | |
FindAll | Retrieves all elements that match the conditions defined by the specified predicate. (Inherited from ProcessQueueT) | |
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. (Inherited from ProcessQueueT) | |
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. (Inherited from ProcessQueueT) | |
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. (Inherited from ProcessQueueT) | |
FindLast | Searches for an element that matches the conditions defined by the specified predicate, and returns the last occurrence within the entire ProcessQueueT. (Inherited from 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. (Inherited from 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. (Inherited from ProcessQueueT) | |
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. (Inherited from ProcessQueueT) | |
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.
(Inherited from ProcessQueueT) | |
ForEach | Performs the specified action on each element of the ProcessQueueT. (Inherited from ProcessQueueT) | |
GetEnumerator |
Returns an enumerator that iterates through the ProcessQueueT.
(Inherited from ProcessQueueT) | |
GetHashCode | Serves as the default hash function. (Inherited from Object) | |
GetOrAdd(TKey, TValue) | Adds a key/value pair to the ProcessDictionaryTKey, TValue if the key does not already exist. | |
GetOrAdd(TKey, FuncTKey, TValue) | Adds a key/value pair to the ProcessDictionaryTKey, TValue if the key does not already exist. | |
GetRange | Creates a shallow copy of a range of elements in the source ProcessQueueT. (Inherited from ProcessQueueT) | |
GetType | Gets the Type of the current instance. (Inherited from Object) | |
IndexOf(KeyValuePairTKey, TValue) |
This function doesn't have the same meaning in the ProcessDictionaryTKey, TValue as it does in
ProcessQueueT, so it is marked as hidden from the editor. However it returns
IndexOfKey(TKey) so that it returns a value that at least makes sense
in case it gets called.
(Overrides ProcessQueueTIndexOf(T)) | |
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. (Inherited from ProcessQueueT) | |
IndexOf(KeyValuePairTKey, TValue, Int32, Int32) |
This function doesn't have the same meaning in the ProcessDictionaryTKey, TValue as it does in
ProcessQueueT, so it is marked as hidden from the editor. However it returns
IndexOfKey(TKey) so that it returns a value that at least makes sense
in case it gets called.
(Overrides ProcessQueueTIndexOf(T, Int32, Int32)) | |
IndexOfKey | Searches for the specified key and returns the zero-based index within the entire ProcessDictionaryTKey, TValue. | |
IndexOfValue | Searches for the specified value and returns the zero-based index of the first occurrence within the entire ProcessDictionaryTKey, TValue. | |
Insert | Inserts an element into the ProcessQueueT at the specified index. (Inherited from ProcessQueueT) | |
InsertRange | Inserts the elements of a collection into the ProcessQueueT at the specified index. (Inherited from ProcessQueueT) | |
LastIndexOf(KeyValuePairTKey, TValue) |
This function doesn't have the same meaning in the ProcessDictionaryTKey, TValue as it does in
ProcessQueueT, so it is marked as hidden from the editor. However it returns
IndexOfKey(TKey) so that it returns a value that at least makes sense
in case it gets called.
(Overrides ProcessQueueTLastIndexOf(T)) | |
LastIndexOf(KeyValuePairTKey, TValue, Int32) |
This function doesn't have the same meaning in the ProcessDictionaryTKey, TValue as it does in
ProcessQueueT, so it is marked as hidden from the editor. However it returns
IndexOfKey(TKey) so that it returns a value that at least makes sense
in case it gets called.
(Overrides ProcessQueueTLastIndexOf(T, Int32)) | |
LastIndexOf(KeyValuePairTKey, TValue, Int32, Int32) |
This function doesn't have the same meaning in the ProcessDictionaryTKey, TValue as it does in
ProcessQueueT, so it is marked as hidden from the editor. However it returns
IndexOfKey(TKey) so that it returns a value that at least makes sense
in case it gets called.
(Overrides ProcessQueueTLastIndexOf(T, Int32, Int32)) | |
MemberwiseClone | Creates a shallow copy of the current Object. (Inherited from Object) | |
OnItemProcessed |
Raises the base class ItemProcessed event.
(Inherited from ProcessQueueT) | |
OnItemsProcessed |
Raises the base class ItemsProcessed event.
(Inherited from ProcessQueueT) | |
OnItemsTimedOut |
Raises the base class ItemsTimedOut event.
(Inherited from ProcessQueueT) | |
OnItemTimedOut |
Raises the base class ItemTimedOut event.
(Inherited from ProcessQueueT) | |
OnProcessException |
Raises the base class ProcessException event.
(Inherited from ProcessQueueT) | |
Remove(TKey) | Removes the element with the specified key from the ProcessDictionaryTKey, TValue. | |
Remove(T) | Removes the first occurrence of a specific object from the ProcessQueueT. (Inherited from ProcessQueueT) | |
RemoveAll | Removes the all the elements that match the conditions defined by the specified predicate. (Inherited from ProcessQueueT) | |
RemoveAt | Removes the element at the specified index of the ProcessQueueT. (Inherited from ProcessQueueT) | |
RemoveRange | Removes a range of elements from the ProcessQueueT. (Inherited from ProcessQueueT) | |
RequeueItem |
Requeues item into ProcessQueueT according to specified requeue reason.
(Inherited from ProcessQueueT) | |
RequeueItems |
Requeues items into ProcessQueueT according to specified requeue reason.
(Inherited from ProcessQueueT) | |
Reverse | Reverses the order of the elements in the entire ProcessQueueT. (Inherited from ProcessQueueT) | |
Reverse(Int32, Int32) | Reverses the order of the elements in the specified range. (Inherited from ProcessQueueT) | |
SignalDataModified |
Manually signals that data has been modified and processing should resume.
(Inherited from ProcessQueueT) | |
Sort | ProcessDictionaryTKey, TValue is based on a DictionaryListTKey, TValue which is already
sorted, so calling this function has no effect. As a result this function is marked as hidden from the editor.
(Overrides ProcessQueueTSort) | |
Sort(ComparisonKeyValuePairTKey, TValue) | ProcessDictionaryTKey, TValue is based on a DictionaryListTKey, TValue which is already
sorted, so calling this function has no effect. As a result this function is marked as hidden from the editor.
(Overrides ProcessQueueTSort(ComparisonT)) | |
Sort(IComparerKeyValuePairTKey, TValue) | ProcessDictionaryTKey, TValue is based on a DictionaryListTKey, TValue which is already
sorted, so calling this function has no effect. As a result this function is marked as hidden from the editor.
(Overrides ProcessQueueTSort(IComparerT)) | |
Sort(Int32, Int32, IComparerKeyValuePairTKey, TValue) | ProcessDictionaryTKey, TValue is based on a DictionaryListTKey, TValue which is already
sorted, so calling this function has no effect. As a result this function is marked as hidden from the editor.
(Overrides ProcessQueueTSort(Int32, Int32, IComparerT)) | |
Start |
Starts item processing.
(Inherited from ProcessQueueT) | |
Stop |
Stops item processing.
(Inherited from ProcessQueueT) | |
ToArray |
Copies the elements contained in the ProcessQueueT to a new array.
(Inherited from ProcessQueueT) | |
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. (Inherited from ProcessQueueT) | |
TryGetValue | Gets the value associated with the specified key. | |
TryTake(T) |
Attempts to remove and return an object from the ProcessQueueT.
(Inherited from ProcessQueueT) |
Name | Description | |
---|---|---|
Disposed |
Occurs when the class has been disposed.
(Inherited from ProcessQueueT) | |
ItemProcessed |
Event that is raised after an item has been successfully processed.
(Inherited from ProcessQueueT) | |
ItemsProcessed |
Event that is raised after an array of items have been successfully processed.
(Inherited from ProcessQueueT) | |
ItemsTimedOut |
Event that is raised if the processing time for an array of items exceeds the specified process timeout.
(Inherited from ProcessQueueT) | |
ItemTimedOut |
Event that is raised if an item's processing time exceeds the specified process timeout.
(Inherited from ProcessQueueT) | |
ProcessException |
Event that is raised if an exception is encountered while attempting to processing an item in the ProcessQueueT.
(Inherited from ProcessQueueT) |
Name | Description | |
---|---|---|
AllParallelKeyValuePairTKey, TValue |
Determines whether all elements of a sequence satisfy a condition with each item being tested in parallel.
(Defined by CollectionExtensions) | |
DistinctByKeyValuePairTKey, TValue, TKey |
Returns only the elements whose keys are distinct.
(Defined by CollectionExtensions) | |
GetEnumValueOrDefault |
Gets the enumeration constant for value, if defined in the enumeration, or a default value.
(Defined by EnumExtensions) | |
GetEnumValueOrDefaultT |
Gets the enumeration constant for this value, if defined in the enumeration, or a default value.
(Defined by EnumExtensions) | |
MajorityKeyValuePairTKey, TValue |
Returns the majority value in the collection, or default type value if no item represents the majority.
(Defined by CollectionExtensions) | |
MajorityKeyValuePairTKey, TValue |
Returns the majority value in the collection, or defaultValue if no item represents the majority.
(Defined by CollectionExtensions) | |
MajorityByKeyValuePairTKey, TValue, TKey |
Returns the majority value in the collection, or default type value if no item represents the majority.
(Defined by CollectionExtensions) | |
MajorityByKeyValuePairTKey, TValue, TKey |
Returns the majority value in the collection, or defaultValue if no item represents the majority.
(Defined by CollectionExtensions) | |
MaxKeyValuePairTKey, TValue | Returns the largest item from the enumeration. (Defined by CollectionExtensions) | |
MaxKeyValuePairTKey, TValue | Returns the largest item from the enumeration. (Defined by CollectionExtensions) | |
MaxByKeyValuePairTKey, TValue, TKey | Selects the largest item from the enumeration. (Defined by CollectionExtensions) | |
MedianKeyValuePairTKey, TValue |
Gets the median item(s) from an enumeration, i.e., one return item for odd lengths, two for even lengths.
(Defined by CollectionExtensions) | |
MiddleKeyValuePairTKey, TValue |
Gets the middle item(s) from an enumeration, i.e., one return item for odd lengths, two for even lengths.
(Defined by CollectionExtensions) | |
MinKeyValuePairTKey, TValue | Returns the smallest item from the enumeration. (Defined by CollectionExtensions) | |
MinKeyValuePairTKey, TValue | Returns the smallest item from the enumeration. (Defined by CollectionExtensions) | |
MinByKeyValuePairTKey, TValue, TKey | Selects the smallest item from the enumeration. (Defined by CollectionExtensions) | |
MinorityKeyValuePairTKey, TValue |
Returns the minority value in the collection, or default type value if no item represents the minority.
(Defined by CollectionExtensions) | |
MinorityKeyValuePairTKey, TValue |
Returns the minority value in the collection, or defaultValue if no item represents the minority.
(Defined by CollectionExtensions) | |
MinorityByKeyValuePairTKey, TValue, TKey |
Returns the minority value in the collection, or default type value if no item represents the majority.
(Defined by CollectionExtensions) | |
MinorityByKeyValuePairTKey, TValue, TKey |
Returns the minority value in the collection, or defaultValue if no item represents the majority.
(Defined by CollectionExtensions) | |
StandardDeviationKeyValuePairTKey, TValue |
Computes the standard deviation over a sequence of Double values.
(Defined by NumericalAnalysisExtensions) | |
StandardDeviationKeyValuePairTKey, TValue |
Computes the standard deviation over a sequence of Decimal values.
(Defined by NumericalAnalysisExtensions) | |
StandardDeviationKeyValuePairTKey, TValue |
Computes the standard deviation over a sequence of Single values.
(Defined by NumericalAnalysisExtensions) | |
ToDelimitedStringKeyValuePairTKey, TValue | Converts an enumeration to a string, using the default delimiter ("|") that can later be
converted back to a list using LoadDelimitedString. (Defined by CollectionExtensions) | |
ToDelimitedStringKeyValuePairTKey, TValue | Converts an enumeration to a string that can later be converted back to a list using
LoadDelimitedString. (Defined by CollectionExtensions) | |
ToDelimitedStringKeyValuePairTKey, TValue | Converts an enumeration to a string that can later be converted back to a list using
LoadDelimitedString. (Defined by CollectionExtensions) | |
ToPagedListKeyValuePairTKey, TValue |
Gets a PagedListT to paginate source enumeration for
a given page and specified pageSize.
(Defined by CollectionExtensions) |
This class acts as a strongly-typed sorted dictionary of objects to be processed.
Note that the ProcessDictionaryTKey, TValue will not start processing until the Start method is called.
Because this ProcessDictionaryTKey, TValue represents a dictionary style collection, all keys must be unique.
Be aware that this class is based on a DictionaryListTKey, TValue (i.e., a SortedListTKey, TValue that implements IListT), and since items in this kind of list are automatically sorted, items will be processed in "sorted" order regardless of the order in which they are added to the list.
Important note about using an "Integer" as the key for this class: because the ProcessDictionaryTKey, TValue base class must implement IList, a normal dictionary cannot be used for the base class. IDictionary implementations do not normally implement the IList interface because of ambiguity that is caused when implementing an integer key. For example, if you implement this class with a key of type "Integer," you will not be able to access items in the ProcessDictionaryTKey, TValue by index without "casting" the ProcessDictionaryTKey, TValue as IList. This is because the Item property in both the IDictionary and IList would have the same parameters (see the DictionaryListTKey, TValue class for more details.).