CollectionExtensions Class

Defines extension functions related to manipulation of arrays and collections.

Definition

Namespace: Gemstone.Collections.CollectionExtensions
Assembly: Gemstone.Common (in Gemstone.Common.dll) Version: 1.0.110 -- Release Build+3e0464f4461df4d3e1175b13966eb47ff832554d
public static class CollectionExtensions
Inheritance
Object    CollectionExtensions

Methods

AddOrUpdateTKey, TValue(IDictionaryTKey, TValue, TKey, TValue) Adds a key/value pair to the IDictionaryTKey, TValue if the key does not already exist, or updates a key/value pair in the IDictionaryTKey, TValue if the key already exists.
AddOrUpdateTKey, TValue(IDictionaryTKey, TValue, TKey, FuncTKey, TValue) Adds a key/value pair to the IDictionaryTKey, TValue if the key does not already exist, or updates a key/value pair in the IDictionaryTKey, TValue if the key already exists.
AddOrUpdateTKey, TValue(IDictionaryTKey, TValue, TKey, TValue, FuncTKey, TValue, TValue) Adds a key/value pair to the IDictionaryTKey, TValue if the key does not already exist, or updates a key/value pair in the IDictionaryTKey, TValue if the key already exists.
AddOrUpdateTKey, TValue(IDictionaryTKey, TValue, TKey, FuncTKey, TValue, FuncTKey, TValue, TValue) Adds a key/value pair to the IDictionaryTKey, TValue if the key does not already exist, or updates a key/value pair in the IDictionaryTKey, TValue if the key already exists.
AddRangeT Adds the specified items to the collection.
All Returns true if all items in BitArray are equal to value.
AllParallelTSource Determines whether all elements of a sequence satisfy a condition with each item being tested in parallel.
Any Returns true if any item in BitArray is equal to value.
CompareToTSourceCompares two arrays.
CopyT Returns a copy of the Array.
DistinctByTSource, TKey Returns only the elements whose keys are distinct.
GetColumnT Gets a column of data out of a 2-dimensional array.
GetOrAddTKey, TValue(IDictionaryTKey, TValue, TKey, TValue) Adds a key/value pair to the IDictionaryTKey, TValue if the key does not already exist.
GetOrAddTKey, TValue(IDictionaryTKey, TValue, TKey, FuncTKey, TValue) Adds a key/value pair to the IDictionaryTKey, TValue if the key does not already exist.
GetOrDefaultTKey, TValue(IDictionaryTKey, TValue, TKey) Attempts to get the value for the given key and returns the default value instead if the key does not exist in the IDictionaryTKey, TValue.
GetOrDefaultTKey, TValue(IDictionaryTKey, TValue, TKey, FuncTKey, TValue) Attempts to get the value for the given key and returns the default value instead if the key does not exist in the IDictionaryTKey, TValue.
GetRangeT Returns elements in the specified range from the collection.
GetRowT Gets a row of data out of a 2-dimensional array.
IndexOfT Returns the index of the first element of the sequence that satisfies a condition or -1 if no such element is found.
LoadDelimitedStringTSource(IListTSource, String, FuncString, TSource)Appends items parsed from delimited string, created with ToDelimitedString, using the default delimiter ("|") into the given list.
LoadDelimitedStringTSource(IListTSource, String, Char, FuncString, TSource)Appends items parsed from delimited string, created with ToDelimitedString, into the given list.
LoadDelimitedStringTSource(IListTSource, String, String, FuncString, TSource)Appends items parsed from delimited string, created with ToDelimitedString, into the given list.
MajorityT(IEnumerableT, Boolean, IEqualityComparerT) Returns the majority value in the collection, or default type value if no item represents the majority.
MajorityT(IEnumerableT, T, Boolean, IEqualityComparerT) Returns the majority value in the collection, or defaultValue if no item represents the majority.
MajorityByTSource, TKey(IEnumerableTSource, FuncTSource, TKey, Boolean, IEqualityComparerTKey) Returns the majority value in the collection, or default type value if no item represents the majority.
MajorityByTSource, TKey(IEnumerableTSource, TSource, FuncTSource, TKey, Boolean, IEqualityComparerTKey) Returns the majority value in the collection, or defaultValue if no item represents the majority.
MaxTSource(IEnumerableTSource, IComparerTSource)Returns the largest item from the enumeration.
MaxTSource(IEnumerableTSource, FuncTSource, TSource, Int32)Returns the largest item from the enumeration.
MaxByTSource, TKeySelects the largest item from the enumeration.
MedianT Gets the median item(s) from an enumeration, i.e., one return item for odd lengths, two for even lengths.
MergeT, TKey, TValue(T, IDictionaryTKey, TValue) Merges elements of multiple dictionaries into a single dictionary with no duplicate key values overwritten.
MergeT, TKey, TValue(T, Boolean, IDictionaryTKey, TValue) Merges elements of multiple dictionaries into a single dictionary.
MinTSource(IEnumerableTSource, IComparerTSource)Returns the smallest item from the enumeration.
MinTSource(IEnumerableTSource, FuncTSource, TSource, Int32)Returns the smallest item from the enumeration.
MinByTSource, TKeySelects the smallest item from the enumeration.
MinorityT(IEnumerableT, Boolean, IEqualityComparerT) Returns the minority value in the collection, or default type value if no item represents the minority.
MinorityT(IEnumerableT, T, Boolean, IEqualityComparerT) Returns the minority value in the collection, or defaultValue if no item represents the minority.
MinorityByTSource, TKey(IEnumerableTSource, FuncTSource, TKey, Boolean, IEqualityComparerTKey) Returns the minority value in the collection, or default type value if no item represents the majority.
MinorityByTSource, TKey(IEnumerableTSource, TSource, FuncTSource, TKey, Boolean, IEqualityComparerTKey) Returns the minority value in the collection, or defaultValue if no item represents the majority.
RemoveWhereT Iterates through each item in the list. Allowing items to be removed from the list.
ScrambleTSource(IListTSource) Rearranges all the elements in the list into a highly-random order.
ScrambleTSource(IListTSource, Int32) Rearranges all the elements in the list into a repeatable pseudo-random order.
ToDelimitedStringTSource(IEnumerableTSource)Converts an enumeration to a string, using the default delimiter ("|") that can later be converted back to a list using LoadDelimitedString.
ToDelimitedStringTSource(IEnumerableTSource, Char)Converts an enumeration to a string that can later be converted back to a list using LoadDelimitedString.
ToDelimitedStringTSource(IEnumerableTSource, String)Converts an enumeration to a string that can later be converted back to a list using LoadDelimitedString.
ToDictionary Converts a name/value collection to a dictionary.
ToPagedListT Gets a PagedListT to paginate source enumeration for a given page and specified pageSize.
UnscrambleTSource Rearranges all the elements in the list previously scrambled with ScrambleTSource(IListTSource, Int32) back into their original order.
UpdateRangeT Updates collection starting at the index with the specified items.

See Also