Class EnumerableExtensions
- Namespace
- System.Collections.Generic
- Assembly
- Motiv.dll
Provides extension methods for IEnumerable<T>.
public static class EnumerableExtensions
- Inheritance
-
EnumerableExtensions
- Inherited Members
Methods
ToEnumerable<T>(T)
Enumerates a single item as an
public static IEnumerable<T> ToEnumerable<T>(this T item)
Parameters
itemTThe item to enumerate.
Returns
- IEnumerable<T>
An
containing only the item provided.
Type Parameters
TThe type of the item.
Where<TModel, TMetadata>(IEnumerable<TModel>, SpecBase<TModel, TMetadata>)
Filters a sequence of values based on the supplied SpecBase<TModel, TMetadata>.
public static BooleanResultsCollection<TModel, TMetadata> Where<TModel, TMetadata>(this IEnumerable<TModel> source, SpecBase<TModel, TMetadata> spec)
Parameters
sourceIEnumerable<TModel>The sequence of values to filter.
specSpecBase<TModel, TMetadata>The specification to use for filtering.
Returns
- BooleanResultsCollection<TModel, TMetadata>
An IEnumerable<T> containing only the values that satisfy the specification.
Type Parameters
TModelThe type of the values in the sequence.
TMetadataThe type of the metadata associated with the specification.