public sealed class AsyncStreamAdapter<T> : IAsyncStreamReader<T>Simple adapter to allow an to be used as a gRPC . Note that cancellation is not fully supported, due to differences between the two interfaces.
Namespace
Google.Api.Gax.Grpc.TestingAssembly
Google.Api.Gax.Grpc.Testing.dll
Type Parameter |
|
|---|---|
| Name | Description |
T |
The element type. |
Constructors
AsyncStreamAdapter(IAsyncEnumerator<T>)
public AsyncStreamAdapter(IAsyncEnumerator<T> enumerator)Wraps the given async enumerator as an async stream reader.
| Parameter | |
|---|---|
| Name | Description |
enumerator |
IAsyncEnumerator<T>The enumerator to wrap |
Properties
Current
public T Current { get; }| Property Value | |
|---|---|
| Type | Description |
T |
|
Methods
MoveNext(CancellationToken)
public async Task<bool> MoveNext(CancellationToken cancellationToken)| Parameter | |
|---|---|
| Name | Description |
cancellationToken |
CancellationToken |
| Returns | |
|---|---|
| Type | Description |
Task<Boolean> |
|