Click or drag to resize

CollectionExtensions Class

Defines extension functions related to manipulation of arrays and collections.
Inheritance Hierarchy
SystemObject
  GSF.CollectionsCollectionExtensions

Namespace: GSF.Collections
Assembly: GSF.Core (in GSF.Core.dll) Version: 2.4.218-beta+101eee949414e414795e55a6e73d88938f0177b8
Syntax
public static class CollectionExtensions
View Source

The CollectionExtensions type exposes the following members.

Methods
 NameDescription
Public Extension MethodAddOrUpdateTKey, 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.
Public Extension MethodAddOrUpdateTKey, 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.
Public Extension MethodAddOrUpdateTKey, 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.
Public Extension MethodAddOrUpdateTKey, 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.
Public Extension MethodAddRangeT Adds the specified items to the collection.
Public Extension MethodAll Returns true if all items in BitArray are equal to value.
Public Extension MethodAllParallelTSource Determines whether all elements of a sequence satisfy a condition with each item being tested in parallel.
Public Extension MethodAny Returns true if any item in BitArray is equal to value.
Public Extension MethodCompareToTSourceCompares two arrays.
Public Extension MethodCopyT Returns a copy of the Array.
Public Extension MethodDistinctByTSource, TKey Returns only the elements whose keys are distinct.
Public Extension MethodGetColumnT Gets a column of data out of a 2-dimensional array.
Public Extension MethodGetOrAddTKey, TValue(IDictionaryTKey, TValue, TKey, TValue) Adds a key/value pair to the IDictionaryTKey, TValue if the key does not already exist.
Public Extension MethodGetOrAddTKey, TValue(IDictionaryTKey, TValue, TKey, FuncTKey, TValue) Adds a key/value pair to the IDictionaryTKey, TValue if the key does not already exist.
Public Extension MethodGetOrDefaultTKey, 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.
Public Extension MethodGetOrDefaultTKey, 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.
Public Extension MethodGetRangeT Returns elements in the specified range from the collection.
Public Extension MethodGetRowT Gets a row of data out of a 2-dimensional array.
Public Extension MethodIndexOfT Returns the index of the first element of the sequence that satisfies a condition or -1 if no such element is found.
Public Extension MethodLoadDelimitedStringTSource(IListTSource, String, FuncString, TSource)Appends items parsed from delimited string, created with ToDelimitedString, using the default delimiter ("|") into the given list.
Public Extension MethodLoadDelimitedStringTSource(IListTSource, String, Char, FuncString, TSource)Appends items parsed from delimited string, created with ToDelimitedString, into the given list.
Public Extension MethodLoadDelimitedStringTSource(IListTSource, String, String, FuncString, TSource)Appends items parsed from delimited string, created with ToDelimitedString, into the given list.
Public Extension MethodMajorityT(IEnumerableT, Boolean, IEqualityComparerT) Returns the majority value in the collection, or default type value if no item represents the majority.
Public Extension MethodMajorityT(IEnumerableT, T, Boolean, IEqualityComparerT) Returns the majority value in the collection, or defaultValue if no item represents the majority.
Public Extension MethodMajorityByTSource, TKey(IEnumerableTSource, FuncTSource, TKey, Boolean, IEqualityComparerTKey) Returns the majority value in the collection, or default type value if no item represents the majority.
Public Extension MethodMajorityByTSource, TKey(IEnumerableTSource, TSource, FuncTSource, TKey, Boolean, IEqualityComparerTKey) Returns the majority value in the collection, or defaultValue if no item represents the majority.
Public Extension MethodMaxTSource(IEnumerableTSource, IComparerTSource)Returns the largest item from the enumeration.
Public Extension MethodMaxTSource(IEnumerableTSource, FuncTSource, TSource, Int32)Returns the largest item from the enumeration.
Public Extension MethodMaxByTSource, TKeySelects the largest item from the enumeration.
Public Extension MethodMedianT Gets the median item(s) from an enumeration, i.e., one return item for odd lengths, two for even lengths.
Public Extension MethodMergeT, TKey, TValue(T, IDictionaryTKey, TValue) Merges elements of multiple dictionaries into a single dictionary with no duplicate key values overwritten.
Public Extension MethodMergeT, TKey, TValue(T, Boolean, IDictionaryTKey, TValue) Merges elements of multiple dictionaries into a single dictionary.
Public Extension MethodMiddleT Gets the middle item(s) from an enumeration, i.e., one return item for odd lengths, two for even lengths.
Public Extension MethodMinTSource(IEnumerableTSource, IComparerTSource)Returns the smallest item from the enumeration.
Public Extension MethodMinTSource(IEnumerableTSource, FuncTSource, TSource, Int32)Returns the smallest item from the enumeration.
Public Extension MethodMinByTSource, TKeySelects the smallest item from the enumeration.
Public Extension MethodMinorityT(IEnumerableT, Boolean, IEqualityComparerT) Returns the minority value in the collection, or default type value if no item represents the minority.
Public Extension MethodMinorityT(IEnumerableT, T, Boolean, IEqualityComparerT) Returns the minority value in the collection, or defaultValue if no item represents the minority.
Public Extension MethodMinorityByTSource, TKey(IEnumerableTSource, FuncTSource, TKey, Boolean, IEqualityComparerTKey) Returns the minority value in the collection, or default type value if no item represents the majority.
Public Extension MethodMinorityByTSource, TKey(IEnumerableTSource, TSource, FuncTSource, TKey, Boolean, IEqualityComparerTKey) Returns the minority value in the collection, or defaultValue if no item represents the majority.
Public Extension MethodScrambleTSource(IListTSource) Rearranges all the elements in the list into a highly-random order.
Public Extension MethodScrambleTSource(IListTSource, Int32) Rearranges all the elements in the list into a repeatable pseudo-random order.
Public Extension MethodToDelimitedStringTSource(IEnumerableTSource)Converts an enumeration to a string, using the default delimiter ("|") that can later be converted back to a list using LoadDelimitedString.
Public Extension MethodToDelimitedStringTSource(IEnumerableTSource, Char)Converts an enumeration to a string that can later be converted back to a list using LoadDelimitedString.
Public Extension MethodToDelimitedStringTSource(IEnumerableTSource, String)Converts an enumeration to a string that can later be converted back to a list using LoadDelimitedString.
Public Extension MethodToDictionary Converts a name/value collection to a dictionary.
Public Extension MethodToPagedListT Gets a PagedListT to paginate source enumeration for a given page and specified pageSize.
Public Extension MethodUnscrambleTSource Rearranges all the elements in the list previously scrambled with ScrambleTSource(IListTSource, Int32) back into their original order.
Public Extension MethodUpdateRangeT Updates collection starting at the index with the specified items.
Top
See Also