RunTimeAspectHelper.Buffer Method
Buffer<T>(IEnumerable<T>)
Evaluates an System.Collections.Generic.IEnumerable<> and stores the result into a System.Collections.Generic.List<>. 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 |
---|---|---|
System.Collections.Generic.IEnumerable<T> | enumerable | An enumerable. |
Returns
Type | Description |
---|---|
System.Collections.Generic.List<T> | A System.Collections.Generic.List<> made from the items of |
Type Parameters
Name | Description |
---|---|
T |
Buffer(IEnumerable)
Evaluates an System.Collections.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 |
---|---|---|
System.Collections.IEnumerable | enumerable | An enumerable. |
Returns
Type | Description |
---|---|
System.Collections.Generic.List<System.Object> | A |
Buffer<T>(IEnumerator<T>)
Evaluates an System.Collections.Generic.IEnumerator<>, stores the result into a System.Collections.Generic.List<> 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 |
---|---|---|
System.Collections.Generic.IEnumerator<T> | enumerator | An enumerator. |
Returns
Type | Description |
---|---|
System.Collections.Generic.List.Enumerator<> | An enumerator on a System.Collections.Generic.List<> made from the items of |
Type Parameters
Name | Description |
---|---|
T |
Buffer(IEnumerator)
Evaluates an System.Collections.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 |
---|---|---|
System.Collections.IEnumerator | enumerator | An enumerator. |
Returns
Type | Description |
---|---|
System.Collections.Generic.List.Enumerator<> | An enumerator on a |