Click or drag to resize

ProcessDictionaryTKey, TValue Class

Represents a thread-safe (via locking) keyed collection of items, based on DictionaryListTKey, TValue, that get processed on independent threads with a consumer provided function.
Inheritance Hierarchy
SystemObject
  GSF.CollectionsProcessQueueKeyValuePairTKey, TValue
    GSF.CollectionsProcessDictionaryTKey, TValue

Namespace: GSF.Collections
Assembly: GSF.Core (in GSF.Core.dll) Version: 2.4.181-beta
Syntax
public class ProcessDictionary<TKey, TValue> : ProcessQueue<KeyValuePair<TKey, TValue>>, 
	IDictionary<TKey, TValue>, ICollection<KeyValuePair<TKey, TValue>>, 
	IEnumerable<KeyValuePair<TKey, TValue>>, IEnumerable
View Source

Type Parameters

TKey
Type of keys used to reference process items.
TValue
Type of values to process.

The ProcessDictionaryTKey, TValue type exposes the following members.

Constructors
Properties
 NameDescription
Public propertyCancellationToken Gets the per processing thread cancellation token to check when a ProcessTimeout is specified.
(Inherited from ProcessQueueT)
Public propertyCanProcessItemFunction Gets or sets the user function used to determine if an item is ready to be processed.
Public propertyCountGets the number of elements actually contained in the ProcessQueueT.
(Inherited from ProcessQueueT)
Public propertyCurrentStatistics Gets the current run-time statistics of the ProcessQueueT as a single group of values.
(Inherited from ProcessQueueT)
Public propertyEnabled Gets or sets indicator that the ProcessQueueT is currently enabled.
(Inherited from ProcessQueueT)
Protected propertyInternalDictionary Gets the internal sorted dictionary for direct use by derived classes.
Protected propertyInternalEnumerable Allows derived classes to access the interfaced internal ProcessQueueT directly.
(Inherited from ProcessQueueT)
Protected propertyInternalList Gets the internal list for direct use by ProcessQueueT.
(Inherited from ProcessQueueT)
Public propertyIsDisposed Gets a flag that indicates whether the object has been disposed.
(Inherited from ProcessQueueT)
Public propertyIsEmpty Gets a value that indicates whether the ProcessQueueT is empty.
(Inherited from ProcessQueueT)
Public propertyIsProcessing Gets indicator that the ProcessQueueT is actively processing items.
(Inherited from ProcessQueueT)
Public propertyIsReadOnlyGets a value indicating whether the ProcessQueueT is read-only.
(Inherited from ProcessQueueT)
Public propertyIsSynchronizedGets a value indicating whether access to the ProcessQueueT is synchronized (thread safe). Always returns true for ProcessQueueT.
(Inherited from ProcessQueueT)
Public propertyItemInt32 Gets or sets the element at the specified index.
(Inherited from ProcessQueueT)
Public propertyItemTKeyGets or sets the value associated with the specified key.
Public propertyItemsBeingProcessed Gets the total number of items currently being processed.
(Inherited from ProcessQueueT)
Public propertyKeysGets an ICollection containing the keys of the ProcessDictionaryTKey, TValue.
Public propertyMaximumThreads Gets or sets the maximum number of threads to process simultaneously.
(Inherited from ProcessQueueT)
Public propertyName Gets the class name.
(Overrides ProcessQueueTName)
Public propertyProcessingIsRealTime Gets indicator that items will be processed in real-time.
(Inherited from ProcessQueueT)
Public propertyProcessingStyle Gets the item QueueProcessingStyle for the ProcessQueueT (i.e., one at a time or many at once).
(Inherited from ProcessQueueT)
Public propertyProcessInterval Gets or sets the interval, in milliseconds, on which new items begin processing.
(Inherited from ProcessQueueT)
Public propertyProcessItemFunction Gets or sets the user function used to process items in the list one at a time.
Public propertyProcessItemsFunction Gets or sets the user function used to process multiple items in the list at once.
(Overrides ProcessQueueTProcessItemsFunction)
Public propertyProcessTimeout Gets or sets the maximum time, in milliseconds, allowed for processing an item.
(Inherited from ProcessQueueT)
Public propertyRequeueModeOnException 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)
Public propertyRequeueModeOnTimeout 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)
Public propertyRequeueOnException Gets or sets whether or not to automatically place an item back into the ProcessQueueT if an exception occurs while processing.
(Inherited from ProcessQueueT)
Public propertyRequeueOnTimeout Gets or sets whether or not to automatically place an item back into the ProcessQueueT if the processing times out.
(Inherited from ProcessQueueT)
Public propertyRunTime Gets the total amount of time, in seconds, that the ProcessQueueT has been active.
(Inherited from ProcessQueueT)
Public propertyStatus Gets current status of ProcessQueueT.
(Inherited from ProcessQueueT)
Public propertySynchronizedOperationType Gets or sets the type of synchronized operation used to process items in a real-time ProcessQueueT.
(Inherited from ProcessQueueT)
Public propertySyncRoot Gets an object that can be used to synchronize access to the ProcessQueueT.
(Inherited from ProcessQueueT)
Public propertyThreadCount Gets the current number of active threads.
(Inherited from ProcessQueueT)
Public propertyThreadingMode Gets the current QueueThreadingMode for the ProcessQueueT (i.e., synchronous or asynchronous).
(Inherited from ProcessQueueT)
Public propertyTotalFunctionCalls Gets the total number of calls to ProcessItemFunction or ProcessItemsFunction.
(Inherited from ProcessQueueT)
Public propertyTotalProcessedItems Gets the total number of items processed so far.
(Inherited from ProcessQueueT)
Public propertyValuesGets an ICollection containing the values of the ProcessDictionaryTKey, TValue.
Top
Methods
 NameDescription
Public methodAdd(T)Adds an item to the ProcessQueueT.
(Inherited from ProcessQueueT)
Public methodAdd(TKey, TValue)Adds an element with the provided key and value to the ProcessDictionaryTKey, TValue.
Public methodAddOrUpdate(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.
Public methodAddOrUpdate(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.
Public methodAddOrUpdate(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.
Public methodAddOrUpdate(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.
Public methodAddRange Adds the elements of the specified collection to the end of the ProcessQueueT.
(Inherited from ProcessQueueT)
Public methodBinarySearch(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))
Public methodBinarySearch(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))
Public methodBinarySearch(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))
Protected methodCanProcessItem Determines if an item can be processed.
(Inherited from ProcessQueueT)
Protected methodCanProcessItems Determines if all items can be processed.
(Inherited from ProcessQueueT)
Public methodClear Removes all elements from the ProcessQueueT.
(Inherited from ProcessQueueT)
Public methodContains Determines whether an element is in the ProcessQueueT.
(Inherited from ProcessQueueT)
Public methodContainsKeyDetermines whether the ProcessDictionaryTKey, TValue contains an element with the specified key.
Public methodContainsValueDetermines whether the ProcessDictionaryTKey, TValue contains an element with the specified value.
Public methodConvertAllTOutputConverts the elements in the current ProcessQueueT to another type, and returns a ProcessQueueT containing the converted elements.
(Inherited from ProcessQueueT)
Public methodCopyToCopies the entire ProcessQueueT to a compatible one-dimensional array, starting at the beginning of the target array.
(Inherited from ProcessQueueT)
Protected methodDataAdded Notifies queue that data was added and/or modified, so it can begin processing data.
(Inherited from ProcessQueueT)
Public methodDispose Releases all the resources used by the ProcessQueueT object.
(Inherited from ProcessQueueT)
Protected methodDispose(Boolean) Releases the unmanaged resources used by the ProcessDictionaryTKey, TValue object and optionally releases the managed resources.
(Overrides ProcessQueueTDispose(Boolean))
Public methodEqualsDetermines whether the specified object is equal to the current object.
(Inherited from Object)
Public methodExistsDetermines whether the ProcessQueueT contains elements that match the conditions defined by the specified predicate.
(Inherited from ProcessQueueT)
Protected methodFinalize Releases the unmanaged resources before the ProcessQueueT object is reclaimed by GC.
(Inherited from ProcessQueueT)
Public methodFindSearches for an element that matches the conditions defined by the specified predicate, and returns the first occurrence within the entire ProcessQueueT.
(Inherited from ProcessQueueT)
Public methodFindAllRetrieves all elements that match the conditions defined by the specified predicate.
(Inherited from ProcessQueueT)
Public methodFindIndex(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)
Public methodFindIndex(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)
Public methodFindIndex(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)
Public methodFindLastSearches for an element that matches the conditions defined by the specified predicate, and returns the last occurrence within the entire ProcessQueueT.
(Inherited from ProcessQueueT)
Public methodFindLastIndex(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)
Public methodFindLastIndex(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)
Public methodFindLastIndex(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)
Public methodFlush 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)
Public methodForEachPerforms the specified action on each element of the ProcessQueueT.
(Inherited from ProcessQueueT)
Public methodGetEnumerator Returns an enumerator that iterates through the ProcessQueueT.
(Inherited from ProcessQueueT)
Public methodGetHashCodeServes as the default hash function.
(Inherited from Object)
Public methodGetOrAdd(TKey, TValue) Adds a key/value pair to the ProcessDictionaryTKey, TValue if the key does not already exist.
Public methodGetOrAdd(TKey, FuncTKey, TValue) Adds a key/value pair to the ProcessDictionaryTKey, TValue if the key does not already exist.
Public methodGetRangeCreates a shallow copy of a range of elements in the source ProcessQueueT.
(Inherited from ProcessQueueT)
Public methodGetTypeGets the Type of the current instance.
(Inherited from Object)
Public methodIndexOf(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))
Public methodIndexOf(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)
Public methodIndexOf(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))
Public methodIndexOfKey Searches for the specified key and returns the zero-based index within the entire ProcessDictionaryTKey, TValue.
Public methodIndexOfValue Searches for the specified value and returns the zero-based index of the first occurrence within the entire ProcessDictionaryTKey, TValue.
Public methodInsertInserts an element into the ProcessQueueT at the specified index.
(Inherited from ProcessQueueT)
Public methodInsertRangeInserts the elements of a collection into the ProcessQueueT at the specified index.
(Inherited from ProcessQueueT)
Public methodLastIndexOf(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))
Public methodLastIndexOf(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))
Public methodLastIndexOf(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))
Protected methodMemberwiseCloneCreates a shallow copy of the current Object.
(Inherited from Object)
Protected methodOnItemProcessed Raises the base class ItemProcessed event.
(Inherited from ProcessQueueT)
Protected methodOnItemsProcessed Raises the base class ItemsProcessed event.
(Inherited from ProcessQueueT)
Protected methodOnItemsTimedOut Raises the base class ItemsTimedOut event.
(Inherited from ProcessQueueT)
Protected methodOnItemTimedOut Raises the base class ItemTimedOut event.
(Inherited from ProcessQueueT)
Protected methodOnProcessException Raises the base class ProcessException event.
(Inherited from ProcessQueueT)
Public methodRemove(TKey)Removes the element with the specified key from the ProcessDictionaryTKey, TValue.
Public methodRemove(T)Removes the first occurrence of a specific object from the ProcessQueueT.
(Inherited from ProcessQueueT)
Public methodRemoveAllRemoves the all the elements that match the conditions defined by the specified predicate.
(Inherited from ProcessQueueT)
Public methodRemoveAtRemoves the element at the specified index of the ProcessQueueT.
(Inherited from ProcessQueueT)
Public methodRemoveRangeRemoves a range of elements from the ProcessQueueT.
(Inherited from ProcessQueueT)
Protected methodRequeueItem Requeues item into ProcessQueueT according to specified requeue reason.
(Inherited from ProcessQueueT)
Protected methodRequeueItems Requeues items into ProcessQueueT according to specified requeue reason.
(Inherited from ProcessQueueT)
Public methodReverseReverses the order of the elements in the entire ProcessQueueT.
(Inherited from ProcessQueueT)
Public methodReverse(Int32, Int32)Reverses the order of the elements in the specified range.
(Inherited from ProcessQueueT)
Public methodSignalDataModified Manually signals that data has been modified and processing should resume.
(Inherited from ProcessQueueT)
Public methodSortProcessDictionaryTKey, 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)
Public methodSort(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))
Public methodSort(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))
Public methodSort(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))
Public methodStart Starts item processing.
(Inherited from ProcessQueueT)
Public methodStop Stops item processing.
(Inherited from ProcessQueueT)
Public methodToArray Copies the elements contained in the ProcessQueueT to a new array.
(Inherited from ProcessQueueT)
Public methodToStringReturns a string that represents the current object.
(Inherited from Object)
Public methodTrueForAllDetermines whether every element in the ProcessQueueT matches the conditions defined by the specified predicate.
(Inherited from ProcessQueueT)
Public methodTryGetValueGets the value associated with the specified key.
Public methodTryTake(T) Attempts to remove and return an object from the ProcessQueueT.
(Inherited from ProcessQueueT)
Top
Events
 NameDescription
Public eventDisposed Occurs when the class has been disposed.
(Inherited from ProcessQueueT)
Public eventItemProcessed Event that is raised after an item has been successfully processed.
(Inherited from ProcessQueueT)
Public eventItemsProcessed Event that is raised after an array of items have been successfully processed.
(Inherited from ProcessQueueT)
Public eventItemsTimedOut Event that is raised if the processing time for an array of items exceeds the specified process timeout.
(Inherited from ProcessQueueT)
Public eventItemTimedOut Event that is raised if an item's processing time exceeds the specified process timeout.
(Inherited from ProcessQueueT)
Public eventProcessException Event that is raised if an exception is encountered while attempting to processing an item in the ProcessQueueT.
(Inherited from ProcessQueueT)
Top
Extension Methods
 NameDescription
Public Extension MethodAllParallelKeyValuePairTKey, TValue Determines whether all elements of a sequence satisfy a condition with each item being tested in parallel.
(Defined by CollectionExtensions)
Public Extension MethodDistinctByKeyValuePairTKey, TValue, TKey Returns only the elements whose keys are distinct.
(Defined by CollectionExtensions)
Public Extension MethodGetEnumValueOrDefault Gets the enumeration constant for value, if defined in the enumeration, or a default value.
(Defined by EnumExtensions)
Public Extension MethodGetEnumValueOrDefaultT Gets the enumeration constant for this value, if defined in the enumeration, or a default value.
(Defined by EnumExtensions)
Public Extension MethodMajorityKeyValuePairTKey, TValue Returns the majority value in the collection, or default type value if no item represents the majority.
(Defined by CollectionExtensions)
Public Extension MethodMajorityKeyValuePairTKey, TValue Returns the majority value in the collection, or defaultValue if no item represents the majority.
(Defined by CollectionExtensions)
Public Extension MethodMajorityByKeyValuePairTKey, TValue, TKey Returns the majority value in the collection, or default type value if no item represents the majority.
(Defined by CollectionExtensions)
Public Extension MethodMajorityByKeyValuePairTKey, TValue, TKey Returns the majority value in the collection, or defaultValue if no item represents the majority.
(Defined by CollectionExtensions)
Public Extension MethodMaxKeyValuePairTKey, TValueReturns the largest item from the enumeration.
(Defined by CollectionExtensions)
Public Extension MethodMaxKeyValuePairTKey, TValueReturns the largest item from the enumeration.
(Defined by CollectionExtensions)
Public Extension MethodMaxByKeyValuePairTKey, TValue, TKeySelects the largest item from the enumeration.
(Defined by CollectionExtensions)
Public Extension MethodMedianKeyValuePairTKey, TValue Gets the median item(s) from an enumeration, i.e., one return item for odd lengths, two for even lengths.
(Defined by CollectionExtensions)
Public Extension MethodMinKeyValuePairTKey, TValueReturns the smallest item from the enumeration.
(Defined by CollectionExtensions)
Public Extension MethodMinKeyValuePairTKey, TValueReturns the smallest item from the enumeration.
(Defined by CollectionExtensions)
Public Extension MethodMinByKeyValuePairTKey, TValue, TKeySelects the smallest item from the enumeration.
(Defined by CollectionExtensions)
Public Extension MethodMinorityKeyValuePairTKey, TValue Returns the minority value in the collection, or default type value if no item represents the minority.
(Defined by CollectionExtensions)
Public Extension MethodMinorityKeyValuePairTKey, TValue Returns the minority value in the collection, or defaultValue if no item represents the minority.
(Defined by CollectionExtensions)
Public Extension MethodMinorityByKeyValuePairTKey, TValue, TKey Returns the minority value in the collection, or default type value if no item represents the majority.
(Defined by CollectionExtensions)
Public Extension MethodMinorityByKeyValuePairTKey, TValue, TKey Returns the minority value in the collection, or defaultValue if no item represents the majority.
(Defined by CollectionExtensions)
Public Extension MethodStandardDeviationKeyValuePairTKey, TValue Computes the standard deviation over a sequence of Double values.
(Defined by NumericalAnalysisExtensions)
Public Extension MethodStandardDeviationKeyValuePairTKey, TValue Computes the standard deviation over a sequence of Decimal values.
(Defined by NumericalAnalysisExtensions)
Public Extension MethodStandardDeviationKeyValuePairTKey, TValue Computes the standard deviation over a sequence of Single values.
(Defined by NumericalAnalysisExtensions)
Public Extension MethodToDelimitedStringKeyValuePairTKey, TValueConverts an enumeration to a string, using the default delimiter ("|") that can later be converted back to a list using LoadDelimitedString.
(Defined by CollectionExtensions)
Public Extension MethodToDelimitedStringKeyValuePairTKey, TValueConverts an enumeration to a string that can later be converted back to a list using LoadDelimitedString.
(Defined by CollectionExtensions)
Public Extension MethodToDelimitedStringKeyValuePairTKey, TValueConverts an enumeration to a string that can later be converted back to a list using LoadDelimitedString.
(Defined by CollectionExtensions)
Public Extension MethodToPagedListKeyValuePairTKey, TValue Gets a PagedListT to paginate source enumeration for a given page and specified pageSize.
(Defined by CollectionExtensions)
Top
Remarks

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.).

See Also