Table of Contents

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

item T

The item to enumerate.

Returns

IEnumerable<T>

An containing only the item provided.

Type Parameters

T

The 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

source IEnumerable<TModel>

The sequence of values to filter.

spec SpecBase<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

TModel

The type of the values in the sequence.

TMetadata

The type of the metadata associated with the specification.