# AsyncEnumeratorBase<TSource, TResult> Class | UniTask

Show / Hide Table of Contents

# AsyncEnumeratorBase<TSource, TResult> Class

###### Namespace: Cysharp.Threading.Tasks.Linq

###### Assembly: cs.temp.dll.dll

    public abstract class AsyncEnumeratorBase<TSource, TResult> : MoveNextSource, IUniTaskSource<bool>, IUniTaskSource, IUniTaskAsyncEnumerator<TResult>, IUniTaskAsyncDisposable

##### Inheritance

System.Object → MoveNextSource → AsyncEnumeratorBase<TSource, TResult>

##### Implements

IUniTaskSource<System.Boolean>
IUniTaskSource
IUniTaskAsyncEnumerator<TResult>
IUniTaskAsyncDisposable

#### Type Parameters

`TSource`
`TResult`

### Members

#### Constructors

Name | Description
--- | ---
AsyncEnumeratorBase(IUniTaskAsyncEnumerable<TSource>, CancellationToken) |

#### Fields

Name | Description
--- | ---
cancellationToken |

#### Properties

Name | Description
--- | ---
Current |
SourceCurrent |

#### Methods

Name | Description
--- | ---
DisposeAsync() |
MoveNextAsync() |
OnFirstIteration() |
SourceMoveNext() |
TryMoveNextCore(Boolean, out Boolean) | If return value is false, continue source.MoveNext.

### Constructors

#### AsyncEnumeratorBase(IUniTaskAsyncEnumerable<TSource>, CancellationToken)

    public AsyncEnumeratorBase(IUniTaskAsyncEnumerable<TSource> source, CancellationToken cancellationToken)

##### Parameters

`source` IUniTaskAsyncEnumerable<TSource>
`cancellationToken` System.Threading.CancellationToken

### Fields

#### cancellationToken

    protected CancellationToken cancellationToken

##### Field Value

System.Threading.CancellationToken

### Properties

#### Current

    public TResult Current { get; protected set; }

##### Property Value

TResult

#### SourceCurrent

    protected TSource SourceCurrent { get; }

##### Property Value

TSource

### Methods

#### DisposeAsync()

    public virtual UniTask DisposeAsync()

##### Returns

UniTask

#### MoveNextAsync()

    public UniTask<bool> MoveNextAsync()

##### Returns

UniTask<System.Boolean>

#### OnFirstIteration()

    protected virtual bool OnFirstIteration()

##### Returns

System.Boolean

#### SourceMoveNext()

    protected void SourceMoveNext()

#### TryMoveNextCore(Boolean, out Boolean)

If return value is false, continue source.MoveNext.

    protected abstract bool TryMoveNextCore(bool sourceHasCurrent, out bool result)

##### Parameters

`sourceHasCurrent` System.Boolean
`result` System.Boolean

##### Returns

System.Boolean

### Implements

IUniTaskSource<T>
IUniTaskSource
IUniTaskAsyncEnumerator<T>
IUniTaskAsyncDisposable