< Summary

Class:Azure.Storage.Files.Shares.Models.GetFileHandlesAsyncCollection
Assembly:Azure.Storage.Files.Shares
File(s):C:\Git\azure-sdk-for-net\sdk\storage\Azure.Storage.Files.Shares\src\Models\GetFileHandlesAsyncCollection.cs
Covered lines:14
Uncovered lines:0
Coverable lines:14
Total lines:38
Line coverage:100% (14 of 14)
Covered branches:0
Total branches:0

Metrics

MethodCyclomatic complexity Line coverage Branch coverage
.ctor(...)-100%100%
GetNextPageAsync()-100%100%

File(s)

C:\Git\azure-sdk-for-net\sdk\storage\Azure.Storage.Files.Shares\src\Models\GetFileHandlesAsyncCollection.cs

#LineLine coverage
 1// Copyright (c) Microsoft Corporation. All rights reserved.
 2// Licensed under the MIT License.
 3
 4using System.Linq;
 5using System.Threading;
 6using System.Threading.Tasks;
 7
 8namespace Azure.Storage.Files.Shares.Models
 9{
 10    internal class GetFileHandlesAsyncCollection : StorageCollectionEnumerator<ShareFileHandle>
 11    {
 12        private readonly ShareFileClient _client;
 13
 614        public GetFileHandlesAsyncCollection(
 615            ShareFileClient client)
 16        {
 617            _client = client;
 618        }
 19
 20        public override async ValueTask<Page<ShareFileHandle>> GetNextPageAsync(
 21            string continuationToken,
 22            int? pageSizeHint,
 23            bool async,
 24            CancellationToken cancellationToken)
 25        {
 626            Response<StorageHandlesSegment> response = await _client.GetHandlesInternal(
 627                continuationToken,
 628                pageSizeHint,
 629                async,
 630                cancellationToken).ConfigureAwait(false);
 31
 432            return Page<ShareFileHandle>.FromValues(
 433                response.Value.Handles.ToArray(),
 434                response.Value.NextMarker,
 435                response.GetRawResponse());
 436        }
 37    }
 38}

Methods/Properties

.ctor(...)
GetNextPageAsync()