Provides helper extension methods for working with collections.
More...
|
| static TOut[] | ConvertToArray< TIn, TOut > (this IReadOnlyCollection< TIn > collection, Func< TIn, TOut > action) |
| | Converts a read-only collection into an array by projecting each item.
|
| static T[] | ConvertToArray< T > (this IReadOnlyCollection< T > collection) |
| | Copies a read-only collection into a new array.
|
| static IEnumerable< int > | EfficientChunk< T > (this IEnumerable< T > source, T[] buffer) |
| | Enumerates chunk sizes while filling a reusable buffer from a source sequence.
|
| static bool | EqualsUnordered< T > (this IReadOnlyCollection< T > collectionA, IReadOnlyCollection< T > collectionB) |
| | Determines whether two collections contain the same items with the same multiplicities, regardless of order.
|
Provides helper extension methods for working with collections.
◆ ConvertToArray< T >()
| T[] FileSurfer.Core.Extensions.CollectionExtensions.ConvertToArray< T > |
( |
this IReadOnlyCollection< T > | collection | ) |
|
|
inlinestatic |
Copies a read-only collection into a new array.
- Parameters
-
| collection | The source collection. |
- Returns
- An array containing source items in source order.
◆ ConvertToArray< TIn, TOut >()
| TOut[] FileSurfer.Core.Extensions.CollectionExtensions.ConvertToArray< TIn, TOut > |
( |
this IReadOnlyCollection< TIn > | collection, |
|
|
Func< TIn, TOut > | action ) |
|
inlinestatic |
Converts a read-only collection into an array by projecting each item.
- Parameters
-
| collection | The source collection. |
| action | The projection function applied to each source item. |
- Returns
- An array containing projected items in source order.
◆ EfficientChunk< T >()
| IEnumerable< int > FileSurfer.Core.Extensions.CollectionExtensions.EfficientChunk< T > |
( |
this IEnumerable< T > | source, |
|
|
T[] | buffer ) |
|
inlinestatic |
Enumerates chunk sizes while filling a reusable buffer from a source sequence.
- Parameters
-
| source | The source sequence to chunk. |
| buffer | The reusable destination buffer. |
- Returns
- A sequence of chunk lengths written into buffer .
◆ EqualsUnordered< T >()
| bool FileSurfer.Core.Extensions.CollectionExtensions.EqualsUnordered< T > |
( |
this IReadOnlyCollection< T > | collectionA, |
|
|
IReadOnlyCollection< T > | collectionB ) |
|
inlinestatic |
Determines whether two collections contain the same items with the same multiplicities, regardless of order.
- Parameters
-
| collectionA | The first collection. |
| collectionB | The second collection. |
- Returns
true when both collections are equivalent as multisets; otherwise, false.
The documentation for this class was generated from the following file: