# AsyncEnumerableRequest&lt;T&gt; Methods

[Type overview](/orleans/docs/api/csharp/microsoft.orleans.core.abstractions/orleans.runtime.asyncenumerablerequest-1/)

## GetAsyncEnumerator(CancellationToken) {#getasyncenumerator-system-threading-cancellationtoken-fc5c07fc}

[Dedicated page](/orleans/docs/api/csharp/microsoft.orleans.core.abstractions/orleans.runtime.asyncenumerablerequest-1/methods/getasyncenumerator-system-threading-cancellationtoken-fc5c07fc/)

[Source](https://github.com/dotnet/orleans/blob/e4e752cedecc2976811db49802c7a999b1f1c704/src/Orleans.Core.Abstractions/Runtime/AsyncEnumerableRequest.cs#L170)

```csharp
public IAsyncEnumerator<T> GetAsyncEnumerator(CancellationToken cancellationToken = default(CancellationToken))
```

Returns an enumerator that iterates asynchronously through the collection.

### Parameters

- `cancellationToken` (`CancellationToken`): A `System.Threading.CancellationToken` that may be used to cancel the asynchronous iteration.

### Returns

An enumerator that can be used to iterate asynchronously through the collection.

## InitializeRequest(GrainReference) {#initializerequest-orleans-runtime-grainreference-60e3b073}

[Dedicated page](/orleans/docs/api/csharp/microsoft.orleans.core.abstractions/orleans.runtime.asyncenumerablerequest-1/methods/initializerequest-orleans-runtime-grainreference-60e3b073/)

[Source](https://github.com/dotnet/orleans/blob/e4e752cedecc2976811db49802c7a999b1f1c704/src/Orleans.Core.Abstractions/Runtime/AsyncEnumerableRequest.cs#L175-L176)

```csharp
public IAsyncEnumerable<T> InitializeRequest(GrainReference targetGrainReference)
```

### Parameters

- `targetGrainReference` (`GrainReference`)

## Invoke {#invoke-7a50409d}

[Dedicated page](/orleans/docs/api/csharp/microsoft.orleans.core.abstractions/orleans.runtime.asyncenumerablerequest-1/methods/invoke-7a50409d/)

[Source](https://github.com/dotnet/orleans/blob/e4e752cedecc2976811db49802c7a999b1f1c704/src/Orleans.Core.Abstractions/Runtime/AsyncEnumerableRequest.cs#L180)

```csharp
public override ValueTask<Response> Invoke()
```

Invoke the object.

## InvokeImplementation {#invokeimplementation-c3fefae3}

[Dedicated page](/orleans/docs/api/csharp/microsoft.orleans.core.abstractions/orleans.runtime.asyncenumerablerequest-1/methods/invokeimplementation-c3fefae3/)

[Source](https://github.com/dotnet/orleans/blob/e4e752cedecc2976811db49802c7a999b1f1c704/src/Orleans.Core.Abstractions/Runtime/AsyncEnumerableRequest.cs#L183)

```csharp
public IAsyncEnumerable<T> InvokeImplementation()
```

Invokes the request.

### Returns

The result of invocation.
