< Summary

Class:Azure.Storage.Files.DataLake.DataLakeLeaseClientExtensions
Assembly:Azure.Storage.Files.DataLake
File(s):C:\Git\azure-sdk-for-net\sdk\storage\Azure.Storage.Files.DataLake\src\DataLakeLeaseClientExtensions.cs
Covered lines:2
Uncovered lines:0
Coverable lines:2
Total lines:45
Line coverage:100% (2 of 2)
Covered branches:0
Total branches:0

Metrics

MethodCyclomatic complexity Line coverage Branch coverage
GetDataLakeLeaseClient(...)-100%100%
GetDataLakeLeaseClient(...)-100%100%

File(s)

C:\Git\azure-sdk-for-net\sdk\storage\Azure.Storage.Files.DataLake\src\DataLakeLeaseClientExtensions.cs

#LineLine coverage
 1// Copyright (c) Microsoft Corporation. All rights reserved.
 2// Licensed under the MIT License.
 3
 4using Azure.Storage.Blobs;
 5
 6namespace Azure.Storage.Files.DataLake
 7{
 8    /// <summary>
 9    /// Add easy to discover methods to <see cref="DataLakeFileSystemClient"/> and
 10    /// <see cref="DataLakePathClient"/> for easily creating <see cref="DataLakeLeaseClient"/>
 11    /// instances.
 12    /// </summary>
 13    public static partial class DataLakeLeaseClientExtensions
 14    {
 15        /// <summary>
 16        /// Initializes a new instance of the <see cref="DataLakeLeaseClient"/> class.
 17        /// </summary>
 18        /// <param name="client">
 19        /// A <see cref="DataLakePathClient"/> representing the path being leased.
 20        /// </param>
 21        /// <param name="leaseId">
 22        /// An optional lease ID.  If no lease ID is provided, a random lease
 23        /// ID will be created.
 24        /// </param>
 25        public static DataLakeLeaseClient GetDataLakeLeaseClient(
 26            this DataLakePathClient client,
 27            string leaseId = null) =>
 54828            new DataLakeLeaseClient(client, leaseId);
 29
 30        /// <summary>
 31        /// Initializes a new instance of the <see cref="DataLakeLeaseClient"/> class.
 32        /// </summary>
 33        /// <param name="client">
 34        /// A <see cref="DataLakeFileSystemClient"/> representing the file system being leased.
 35        /// </param>
 36        /// <param name="leaseId">
 37        /// An optional lease ID.  If no lease ID is provided, a random lease
 38        /// ID will be created.
 39        /// </param>
 40        public static DataLakeLeaseClient GetDataLakeLeaseClient(
 41            this DataLakeFileSystemClient client,
 42            string leaseId = null) =>
 21243            new DataLakeLeaseClient(client, leaseId);
 44    }
 45}