Contains various static methods for working with sequences, extending the functionality of LINQ.
More...
|
static IEnumerable< T2 > | SelectWhere< T1, T2 > (this IEnumerable< T1 > input, SelectWhereDelegate< T1, T2 > selectionDelegate) |
| Perform select/map and where/filter operations on a sequence with a single function. More...
|
|
static T2 | FirstOrDefaultWhere< T1, T2 > (this IEnumerable< T1 > input, SelectWhereDelegate< T1, T2 > selectionDelegate) |
| Perform select/map and where/filter operations on a sequence with a single function, and returns the result of the select operation for the first passing element. More...
|
|
static int | IndexOf< T > (this IReadOnlyList< T > list, in T item) |
| IndexOf operation for an IReadOnlyList, which is not included in .NET. More...
|
|
Contains various static methods for working with sequences, extending the functionality of LINQ.
◆ FirstOrDefaultWhere< T1, T2 >()
static T2 Infohazard.Core.EnumerableUtility.FirstOrDefaultWhere< T1, T2 > |
( |
this IEnumerable< T1 > |
input, |
|
|
SelectWhereDelegate< T1, T2 > |
selectionDelegate |
|
) |
| |
|
static |
Perform select/map and where/filter operations on a sequence with a single function, and returns the result of the select operation for the first passing element.
- Parameters
-
input | The input sequence. |
selectionDelegate | The delegate to use. |
- Template Parameters
-
T1 | Input type of the delegate. |
T2 | Output type of the select operation. |
- Returns
- The result of the select operation for the first passing element.
◆ IndexOf< T >()
static int Infohazard.Core.EnumerableUtility.IndexOf< T > |
( |
this IReadOnlyList< T > |
list, |
|
|
in T |
item |
|
) |
| |
|
static |
IndexOf operation for an IReadOnlyList, which is not included in .NET.
This cannot take into account custom equality comparers.
- Parameters
-
list | List to search. |
item | Item to search for. |
- Template Parameters
-
T | Type of items in the list. |
- Returns
- The index of the item, or -1 if not found.
◆ SelectWhere< T1, T2 >()
static IEnumerable< T2 > Infohazard.Core.EnumerableUtility.SelectWhere< T1, T2 > |
( |
this IEnumerable< T1 > |
input, |
|
|
SelectWhereDelegate< T1, T2 > |
selectionDelegate |
|
) |
| |
|
static |
Perform select/map and where/filter operations on a sequence with a single function.
- Parameters
-
input | The input sequence. |
selectionDelegate | The delegate to use. |
- Template Parameters
-
T1 | Input type of the delegate. |
T2 | Output type of the select operation. |
- Returns
- The resulting sequence.
◆ SelectWhereDelegate< in T1, T2 >()
delegate bool Infohazard.Core.EnumerableUtility.SelectWhereDelegate< in T1, T2 > |
( |
T1 |
input, |
|
|
out T2 |
output |
|
) |
| |
Delegate for functions that perform both a select/map and where/filter operation.
- Template Parameters
-
T1 | Input type of the function. |
T2 | Output type of the select operation. |
The documentation for this class was generated from the following file:
- Runtime/Utility/EnumerableUtility.cs