< Summary

Class:Azure.Storage.Files.Shares.Models.GetDirectoryHandlesAsyncCollection
Assembly:Azure.Storage.Files.Shares
File(s):C:\Git\azure-sdk-for-net\sdk\storage\Azure.Storage.Files.Shares\src\Models\GetDirectoryHandlesAsyncCollection.cs
Covered lines:17
Uncovered lines:0
Coverable lines:17
Total lines:42
Line coverage:100% (17 of 17)
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\GetDirectoryHandlesAsyncCollection.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 GetDirectoryHandlesAsyncCollection : StorageCollectionEnumerator<ShareFileHandle>
 11    {
 12        private readonly ShareDirectoryClient _client;
 13        private readonly bool? _recursive;
 14
 715        public GetDirectoryHandlesAsyncCollection(
 716            ShareDirectoryClient client,
 717            bool? recursive)
 18        {
 719            _client = client;
 720            _recursive = recursive;
 721        }
 22
 23        public override async ValueTask<Page<ShareFileHandle>> GetNextPageAsync(
 24            string continuationToken,
 25            int? pageSizeHint,
 26            bool async,
 27            CancellationToken cancellationToken)
 28        {
 529            Response<StorageHandlesSegment> response = await _client.GetHandlesInternal(
 530                continuationToken,
 531                pageSizeHint,
 532                _recursive,
 533                async,
 534                cancellationToken).ConfigureAwait(false);
 35
 336            return Page<ShareFileHandle>.FromValues(
 337                response.Value.Handles.ToArray(),
 338                response.Value.NextMarker,
 339                response.GetRawResponse());
 340        }
 41    }
 42}

Methods/Properties

.ctor(...)
GetNextPageAsync()