这个
WindowsAzure.Storage 7.1.3-Preview
ASP的nuget包。NET核心1.0.0
不包含
ExecuteQuerySegmentedAsync
函数。
也许你应该在
github repo
.
否则,如果需要传递取消令牌,可以使用
this
:
internal static class CloudTableExtensions
{
public static async Task<IList<DynamicTableEntity>> ExecuteQueryAsync(this CloudTable table,
TableQuery query, CancellationToken cancellationToken = default(CancellationToken))
{
var items = new List<DynamicTableEntity>();
TableContinuationToken token = null;
do
{
var seg =
await
table.ExecuteQuerySegmentedAsync(query, token, new TableRequestOptions(), new OperationContext(),
cancellationToken);
token = seg.ContinuationToken;
items.AddRange(seg);
} while (token != null && !cancellationToken.IsCancellationRequested
&& (query.TakeCount == null || items.Count < query.TakeCount.Value));
return items;
}
}