GetPageRangesAsyncCollection
using Azure.Storage.Blobs.Specialized;
using System;
using System.Runtime.CompilerServices;
using System.Threading;
using System.Threading.Tasks;
namespace Azure.Storage.Blobs.Models
{
internal class GetPageRangesAsyncCollection : StorageCollectionEnumerator<PageRangeItem>
{
private readonly bool _diff;
private readonly PageBlobClient _client;
private readonly HttpRange? _range;
private readonly string _snapshot;
private readonly string _previousSnapshot;
private readonly Uri _previousSnapshotUri;
private readonly PageBlobRequestConditions _requestConditions;
private readonly string _operationName;
public GetPageRangesAsyncCollection(bool diff, PageBlobClient client, HttpRange? range, string snapshot, string previousSnapshot, Uri previousSnapshotUri, PageBlobRequestConditions requestConditions, string operationName)
{
_diff = diff;
_client = client;
_range = range;
_snapshot = snapshot;
_previousSnapshot = previousSnapshot;
_previousSnapshotUri = previousSnapshotUri;
_requestConditions = requestConditions;
_operationName = operationName;
}
[AsyncStateMachine(typeof(<GetNextPageAsync>d__9))]
public override ValueTask<Page<PageRangeItem>> GetNextPageAsync(string continuationToken, int? pageSizeHint, bool async, CancellationToken cancellationToken)
{
<GetNextPageAsync>d__9 stateMachine = default(<GetNextPageAsync>d__9);
stateMachine.<>t__builder = AsyncValueTaskMethodBuilder<Page<PageRangeItem>>.Create();
stateMachine.<>4__this = this;
stateMachine.continuationToken = continuationToken;
stateMachine.pageSizeHint = pageSizeHint;
stateMachine.async = async;
stateMachine.cancellationToken = cancellationToken;
stateMachine.<>1__state = -1;
stateMachine.<>t__builder.Start(ref stateMachine);
return stateMachine.<>t__builder.Task;
}
}
}