public override async ValueTask <Page <ShareItem> > GetNextPageAsync( string continuationToken, int?pageSizeHint, bool async, CancellationToken cancellationToken) { Response <SharesSegment> response = await _client.GetSharesInternal( continuationToken, _traits, _states, _prefix, pageSizeHint, async, cancellationToken).ConfigureAwait(false); return(Page <ShareItem> .FromValues( response.Value.ShareItems.ToShareItems().ToArray(), response.Value.NextMarker, response.GetRawResponse())); }
public override async ValueTask <Page <ShareItem> > GetNextPageAsync( string continuationToken, int?pageSizeHint, bool isAsync, CancellationToken cancellationToken) { Task <Response <SharesSegment> > task = _client.GetSharesInternal( continuationToken, _traits, _states, _prefix, pageSizeHint, isAsync, cancellationToken); Response <SharesSegment> response = isAsync ? await task.ConfigureAwait(false) : task.EnsureCompleted(); return(Page <ShareItem> .FromValues( response.Value.ShareItems.ToArray(), response.Value.NextMarker, response.GetRawResponse())); }