Class BaseParallelEnumerator<T1, T2, T3, T4>
- Namespace
- Garyon.Objects.Enumerators
- Assembly
- Garyon.dll
Provides the base mechanism for a parallel enumerator for 4 IEnumerator<T> objects.
public abstract class BaseParallelEnumerator<T1, T2, T3, T4> : BaseParallelEnumerator<T1, T2, T3>
Type Parameters
T1The type of the elements the first IEnumerator<T> enumerates.
T2The type of the elements the second IEnumerator<T> enumerates.
T3The type of the elements the third IEnumerator<T> enumerates.
T4The type of the elements the fourth IEnumerator<T> enumerates.
- Inheritance
-
BaseParallelEnumerator<T1, T2>BaseParallelEnumerator<T1, T2, T3>BaseParallelEnumerator<T1, T2, T3, T4>
- Derived
- Inherited Members
- Extension Methods
Constructors
BaseParallelEnumerator(IEnumerable<T1>, IEnumerable<T2>, IEnumerable<T3>, IEnumerable<T4>)
Initializes a new instance of the BaseParallelEnumerator<T1, T2, T3, T4> class.
protected BaseParallelEnumerator(IEnumerable<T1> enumerator1, IEnumerable<T2> enumerator2, IEnumerable<T3> enumerator3, IEnumerable<T4> enumerator4)
Parameters
enumerator1IEnumerable<T1>The first enumerator.
enumerator2IEnumerable<T2>The second enumerator.
enumerator3IEnumerable<T3>The third enumerator.
enumerator4IEnumerable<T4>The fourth enumerator.
Properties
Enumerator4
Gets the fourth enumerator.
protected IEnumerator<T4> Enumerator4 { get; }
Property Value
- IEnumerator<T4>
Enumerator4Alive
Determines whether the fourth enumerator has not reached the end of the collection.
public bool Enumerator4Alive { get; }
Property Value
Methods
Dispose()
Calls the Dispose() method on all enumerators.
public override void Dispose()
GetCurrentValue<T>(int)
Gets the current value of the IEnumerator<T> at the specified index.
protected override T? GetCurrentValue<T>(int index)
Parameters
indexintThe zero-based index of the IEnumerator<T>.
Returns
- T
The current value of the IEnumerator<T>, if the given IEnumerator<T> is alive, otherwise default.
Type Parameters
TThe type of the current value.
MoveNext()
Advances all enumerators to the next element of each collection.
public override bool MoveNext()
Returns
- bool
true if any of the 4 enumerators was successfully advanced to the next element; false if all enumerators have passed the end of the collection.
Reset()
Sets all enumerators to their initial position, which is before the first element in each collection.
public override void Reset()