Share via


IReliableQueue<T>.CreateEnumerableAsync(ITransaction) Method

Definition

Creates an async enumerable over the IReliableQueue<T>.

public System.Threading.Tasks.Task<Microsoft.ServiceFabric.Data.IAsyncEnumerable<T>> CreateEnumerableAsync(Microsoft.ServiceFabric.Data.ITransaction tx);
abstract member CreateEnumerableAsync : Microsoft.ServiceFabric.Data.ITransaction -> System.Threading.Tasks.Task<Microsoft.ServiceFabric.Data.IAsyncEnumerable<'T>>
Public Function CreateEnumerableAsync (tx As ITransaction) As Task(Of IAsyncEnumerable(Of T))

Parameters

tx
ITransaction

Transaction to associate this operation with.

Returns

IEnumerable that represents all the values.

Exceptions

Exception indicates that the <cref name="IReliableQueue{T}"></cref> cannot serve reads at the moment. <cref name="FabricNotReadableException"></cref> can be thrown in all <cref name="ReplicaRole"></cref>s. One example for it being thrown in the <cref name="ReplicaRole.Primary"></cref> is loss of <cref name="IStatefulServicePartition.ReadStatus"></cref>. One example for it being thrown in the <cref name="ReplicaRole.ActiveSecondary"></cref> is that Reliable Queue's state is not yet consistent.

Applies to