Buffer<T>(IEnumerable<T>)
Evaluates an IEnumerable<T> and stores the result into a List<T>. If the enumerable is already a list, returns the input list. The intended side effect of this method is to completely evaluate the input enumerable.
Declaration
public static List<T> Buffer<T>(this IEnumerable<T> enumerable)
Parameters
Type | Name | Description |
---|---|---|
IEnumerable<T> | enumerable | An enumerable. |
Returns
Type | Description |
---|---|
List<T> | A List<T> made from the items of |
Type Parameters
Name | Description |
---|---|
T |
Buffer(IEnumerable)
Evaluates an IEnumerable and stores the result into a List<object>
. If the enumerable is already
a list, returns the input list. The intended side effect of this method is to completely evaluate the input enumerable.
Declaration
public static List<object> Buffer(this IEnumerable enumerable)
Parameters
Type | Name | Description |
---|---|---|
IEnumerable | enumerable | An enumerable. |
Returns
Type | Description |
---|---|
List<object> | A |
Buffer<T>(IEnumerator<T>)
Evaluates an IEnumerator<T>, stores the result into a List<T> and returns an enumerator for this list. If the enumerator is already a list enumerator, returns the input enumerator. The intended side effect of this method is to completely evaluate the input enumerator.
Declaration
public static List<T>.Enumerator Buffer<T>(this IEnumerator<T> enumerator)
Parameters
Type | Name | Description |
---|---|---|
IEnumerator<T> | enumerator | An enumerator. |
Returns
Type | Description |
---|---|
List<T>.Enumerator | An enumerator on a List<T> made from the items of |
Type Parameters
Name | Description |
---|---|
T |
Buffer(IEnumerator)
Evaluates an IEnumerator, stores the result into a List<object>
and returns an enumerator for this list.
If the enumerator is already a list enumerator, returns the input enumerator.
The intended side effect of this method is to completely evaluate the input enumerator.
Declaration
public static List<object?>.Enumerator Buffer(this IEnumerator enumerator)
Parameters
Type | Name | Description |
---|---|---|
IEnumerator | enumerator | An enumerator. |
Returns
Type | Description |
---|---|
List<object>.Enumerator | An enumerator on a |