sdk/dotnet/test/Microsoft.Datasync.Client.Test/Table/Operations.OfflineTableOfT/GetAsyncItems.Test.cs
/// <summary>
/// Gets all the items from the list of items returned.
/// </summary>
/// <returns></returns>
Gets all the items from the list of items returned.
Gets all the items from the list of items returned .
private async Task<List<ClientMovie>> GetAllItems(ITableQuery<ClientMovie> query = null, IOfflineTable<ClientMovie> table = null, long? nItems = null)
        {
            table ??= base.table;
            query ??= table.CreateQuery();
            List<ClientMovie> items = new();
            var pageable = table.GetAsyncItems(query) as AsyncPageable<ClientMovie>;
            await foreach (var item in pageable)
            {
                if (nItems != null)
                {
                    Assert.Equal(nItems!, pageable.Count);
                }
                items.Add(item);
            }
            return items;
        }
private async Task < List < ClientMovie > > GetAllItems ( ITableQuery < ClientMovie > query = null , IOfflineTable < ClientMovie > table = null , long ? nItems = null ) { table ??= base . table ; query ??= table . CreateQuery ( ) ; List < ClientMovie > items = new ( ) ; var pageable = table . GetAsyncItems ( query ) as AsyncPageable < ClientMovie > ; await foreach ( var item in pageable ) { if ( nItems != null ) { Assert . Equal ( nItems ! , pageable . Count ) ; } items . Add ( item ) ; } return items ; }
Gets all the items from the list of items returned.
Gets all the items from the list of items returned .
None
query
ITableQuery<ClientMovie>
table
IOfflineTable<ClientMovie>
nItems
long?