Udostępnij za pośrednictwem


QueryResponse<T>.CurrentPage Property

Definition

The current page of queried items.

public System.Collections.Generic.IEnumerable<T> CurrentPage { get; }
member this.CurrentPage : seq<'T>
Public ReadOnly Property CurrentPage As IEnumerable(Of T)

Property Value

Examples

QueryResponse<Twin> queriedTwins = await iotHubServiceClient.Query.CreateAsync<Twin>("SELECT * FROM devices"); while (await queriedTwins.MoveNextAsync()) { Twin queriedTwin = queriedTwins.Current; Console.WriteLine(queriedTwin); }

Remarks

While you can iterate over the queried page of items using this, there is no logic built into it that allows you to fetch the next page of results automatically. Because of that, most users are better off following the sample code that iterates item by item rather than page by page.

Applies to