Class BaseParallelEnumerator<T1, T2, T3>
- Namespace
- Garyon.Objects.Enumerators
- Assembly
- Garyon.dll
Provides the base mechanism for a parallel enumerator for 3 IEnumerator<T> objects.
public abstract class BaseParallelEnumerator<T1, T2, T3> : BaseParallelEnumerator<T1, T2>
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.
- Inheritance
-
BaseParallelEnumerator<T1, T2>BaseParallelEnumerator<T1, T2, T3>
- Derived
- Inherited Members
- Extension Methods
Constructors
BaseParallelEnumerator(IEnumerable<T1>, IEnumerable<T2>, IEnumerable<T3>)
Initializes a new instance of the BaseParallelEnumerator<T1, T2, T3> class.
protected BaseParallelEnumerator(IEnumerable<T1> enumerator1, IEnumerable<T2> enumerator2, IEnumerable<T3> enumerator3)
Parameters
enumerator1IEnumerable<T1>The first enumerator.
enumerator2IEnumerable<T2>The second enumerator.
enumerator3IEnumerable<T3>The third enumerator.
Properties
Enumerator3
Gets the third enumerator.
protected IEnumerator<T3> Enumerator3 { get; }
Property Value
- IEnumerator<T3>
Enumerator3Alive
Determines whether the third enumerator has not reached the end of the collection.
public bool Enumerator3Alive { 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 3 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()