Click or drag to resize

Utils_Linq Class

LINQ utilities.
Inheritance Hierarchy
SystemObject
  MicaSystems.UtilsUtils_Linq

Namespace:  MicaSystems.Utils
Assembly:  MicaSystems.Utils (in MicaSystems.Utils.dll) Version: 1.0.0.0 (1.1.0.123)
Syntax
C#
public static class Utils_Linq

The Utils_Linq type exposes the following members.

Methods
  NameDescription
Public methodStatic memberAddK, V(ListKeyValuePairK, V, K, V)
Adds a new instance of KeyValuePair in a list of KeyValuePair or same type.
Public methodStatic memberAddV1, V2(ListTupleV1, V2, V1, V2)
Adds a new instance of Tuple in a list of Tuple or same type.
Public methodStatic memberAddK, V(ListSerializableKeyValuePairK, V, K, V)
Adds a new instance of KeyValuePair in a list of KeyValuePair or same type.
Public methodStatic memberAddV1, V2, V3(ListTupleV1, V2, V3, V1, V2, V3)
Adds a new instance of Tuple in a list of Tuple or same type.
Public methodStatic memberAddConcat
Adds a single string to a string List from an array of strings to concatanate.
Public methodStatic memberAddFormat
Adds a formatted string to the List.
Public methodStatic memberAddIfNotNullT
Adds an object to the list if it is not null.
Public methodStatic memberAddRange(ListString, String)
Adds the elements of the specified collection to the end of the List.
Public methodStatic memberAddRangeT(ListT, T)
Adds the elements of the specified collection to the end of the System.Collections.Generic.List.
Public methodStatic memberCastToListT(IEnumerable)
Casts an enumerable to a strongly typed List.
Public methodStatic memberCastToListT(IEnumerable, FuncObject, T)
Casts an enumerable to a strongly typed List.
Public methodStatic memberCompareT
Compares two lists. Returns True if the two lists are both null, or both empty, or both have the same elements.
Public methodStatic memberConcat(IEnumerableString, String)
Joins all strings of the list using a separator.
Public methodStatic memberConcat(ListGuid, String)
Concatanates all guids inside a single string using a separator.
Public methodStatic memberConcat(ListInt64, String)
Concatanates all numbers inside a single string using a separator.
Public methodStatic memberContains(ListString, String, Boolean)
Checks if one of the list values matches a specific text.
Public methodStatic memberContains(ListString, String, StringComparison)
Checks if one of the list values contains a text.
Public methodStatic memberContainsK, V(IEnumerableKeyValuePairK, V, K, V)
Determines whether an element is in the list.
Public methodStatic memberContainsK, V(IEnumerableSerializableKeyValuePairK, V, K, V)
Determines whether an element is in the list.
Public methodStatic memberConvert
Converts a NameValueCollection to an List of KeyValuePair.
Public methodStatic memberCreateListT
Creates a new list of type T with the specified items as default values.
Public methodStatic memberCreateReadOnlyCollectionT
Creates a new instance of an empty read-only list/collection.
Public methodStatic memberDistinctByT, TIdentity
Returns distinct elements from a sequence by using a specified predicate to compare values.
Public methodStatic memberForEachT
Performs the specified action on each element of the System.Collections.Generic.IEnumerable/T/.
Public methodStatic memberGetRandomItemT
Gets a random item from a list of items.
Public methodStatic memberGetRangeT
Gets a range of values.
Public methodStatic memberGetString(IEnumerableString, String)
Joins all strings of the list using a separator.
Public methodStatic memberGetStringT(IEnumerableT, String)
Creates a string with all values in the List, separated by a string.

Uses ToString to convert objects.

Public methodStatic memberGetStringT(IEnumerableT, String, FuncT, String)
Creates a string with all values (converted using a function) in the List, separated by a string.
Public methodStatic memberIContains(IEnumerableString, String)
Checks if one of the list values matches a specific text, ignoring case.
Public methodStatic memberIContains(StringCollection, String)
Checks if a string collection contains a specific text. The comparison is not case sensitive.
Public methodStatic memberIsEmptyT
Checks if a list is empty.
Public methodStatic memberIsGenericList(Object)
Checks if this object is a System.Collections.Generic.List.
Public methodStatic memberIsGenericList(Object, Type)
Checks if this object is a System.Collections.Generic.List using type as T.
Public methodStatic memberIsNotEmptyT
Checks if a list is not empty.
Public methodStatic memberIsNullOrEmptyT
Checks if a list is null or empty.
Public methodStatic memberListToDataTableT
Converts a list of objects to a DataTable using T properties as columns.
Public methodStatic memberMaxOrZeroT(ListT, FuncT, Int32)
Gets the maximum number of a list, where all elements are transformed using a function.
Public methodStatic memberMaxOrZeroT(ListT, FuncT, Single)
Gets the maximum number of a list, where all elements are transformed using a function.
Public methodStatic memberMoveT(IListT, Int32, Int32)
Moves an object of a list to a new index.
Public methodStatic memberMoveT(IListT, T, Utils_LinqMoveDirection)
Moves an object of a list up or down if possible.
Public methodStatic memberMoveT(IListT, T, Int32)
Moves an object of a list to a new index.
Public methodStatic memberNotNullT
Filters a collection of values, excluding null values.
Public methodStatic memberPopT
Filters, removes and returns a sequence of values based on a predicate.
Public methodStatic memberPopFirstT
Finds, removes and returns the first found occurrence of an element (based on a predicate).
Public methodStatic memberRemoveK, V(ListKeyValuePairK, V, K, V)
Removes the first occurrence of a specific object from the list.
Public methodStatic memberRemoveK, V(ListSerializableKeyValuePairK, V, K, V)
Removes the first occurrence of a specific object from the list.
Public methodStatic memberRemoveRange(ListString, ListString)
Removes all occurences of multiple strings from the List.
Public methodStatic memberRemoveRange(ListString, ListString, Boolean)
Removes all occurences of multiple strings from the List.
Public methodStatic memberRemoveRangeT(ListT, ListT)
Removes all occurences of multiple objects from the List.
Public methodStatic memberRemoveRangeT(ListT, FuncT, Boolean)
Removes all matching objects from the List.
Public methodStatic memberRemoveRangeT(ListT, T)
Removes all occurences of multiple objects from the List.
Public methodStatic memberToDictionaryK, V
Converts a list of KeyValuePair to a dictionary using the same types.
Public methodStatic memberUpdateListFromListT1, T2
This function will update a target list using a source list.

Using a comparison function, it will find missing and obsolete objects.

All corresponding object in toList will be updated using the object in fromList.

Public methodStatic memberWhereK, V
Filters a dictionary using a predicate.
Top
See Also