Table of Contents

Class IEnumeratorExtensions

Namespace
Garyon.Extensions
Assembly
Garyon.dll

Contains extension methods for the IEnumerator<T> interface.

public static class IEnumeratorExtensions
Inheritance
IEnumeratorExtensions
Inherited Members

Methods

GetEnumerator(IEnumerator)

Returns the given enumerator instance.

public static IEnumerator GetEnumerator(this IEnumerator enumerator)

Parameters

enumerator IEnumerator

The enumerator instance to return.

Returns

IEnumerator

The given enumerator instance.

Remarks

This method is only present to enable direct enumeration of the enumeartor in a foreach statement.
Avoid using it directly.

GetEnumerator<T>(IEnumerator<T>)

Returns the given enumerator instance.

public static IEnumerator<T> GetEnumerator<T>(this IEnumerator<T> enumerator)

Parameters

enumerator IEnumerator<T>

The enumerator instance to return.

Returns

IEnumerator<T>

The given enumerator instance.

Type Parameters

T

The type of the enumerated values.

Remarks

This method is only present to enable direct enumeration of the enumeartor in a foreach statement.
Avoid using it directly.

GetEnumerator<TEnumerator>(TEnumerator)

Returns the given enumerator instance.

public static TEnumerator GetEnumerator<TEnumerator>(this TEnumerator enumerator) where TEnumerator : IEnumerator

Parameters

enumerator TEnumerator

The enumerator instance to return.

Returns

TEnumerator

The given enumerator instance.

Type Parameters

TEnumerator

Remarks

This method is only present to enable direct enumeration of the enumeartor in a foreach statement.
Avoid using it directly.

GetEnumerator<TEnumerator, TValue>(TEnumerator)

Returns the given enumerator instance.

public static TEnumerator GetEnumerator<TEnumerator, TValue>(this TEnumerator enumerator) where TEnumerator : IEnumerator<TValue>

Parameters

enumerator TEnumerator

The enumerator instance to return.

Returns

TEnumerator

The given enumerator instance.

Type Parameters

TEnumerator

The type of the enumerator.

TValue

The type of the enumerated values.

Remarks

This method is only present to enable direct enumeration of the enumeartor in a foreach statement.
Avoid using it directly.

ToArray<T>(IEnumerator<T>, bool)

public static T[] ToArray<T>(this IEnumerator<T> enumerator, bool resetEnumerator = false)

Parameters

enumerator IEnumerator<T>
resetEnumerator bool

Returns

T[]

Type Parameters

T

ToImmutableArray<T>(IEnumerator<T>, bool)

public static ImmutableArray<T> ToImmutableArray<T>(this IEnumerator<T> enumerator, bool resetEnumerator = false)

Parameters

enumerator IEnumerator<T>
resetEnumerator bool

Returns

ImmutableArray<T>

Type Parameters

T

ToList<T>(IEnumerator<T>, bool)

public static List<T> ToList<T>(this IEnumerator<T> enumerator, bool resetEnumerator = false)

Parameters

enumerator IEnumerator<T>
resetEnumerator bool

Returns

List<T>

Type Parameters

T

WithResetState<T>(IEnumerator<T>)

public static IEnumerator<T> WithResetState<T>(this IEnumerator<T> enumerator)

Parameters

enumerator IEnumerator<T>

Returns

IEnumerator<T>

Type Parameters

T