以下代码是throwing不是迭代器接口类型,只有当我使用async等待和包装IEnumerable与任务.如果我删除异步等待,我可以使用IEnumerable< List>>.
private async Task<IEnumerable<List<T>>> GetTableDataAsync<T>(CloudTable cloudTable,TableQuery<T> tableQuery) where T : ITableEntity,new() { TableContinuationToken contineousToken = null; do { var currentSegment = await GetAzureTableDateAsync(cloudTable,tableQuery,contineousToken); contineousToken = currentSegment.ContinuationToken; yield return currentSegment.Results; } while (contineousToken != null); }
虽然我可以考虑Rx,我不知道是什么导致这个问题.