< Summary

Class:Azure.Storage.Queues.Models.QueueExtensions
Assembly:Azure.Storage.Queues
File(s):C:\Git\azure-sdk-for-net\sdk\storage\Azure.Storage.Queues\src\Models\QueueTraits.cs
Covered lines:4
Uncovered lines:0
Coverable lines:4
Total lines:44
Line coverage:100% (4 of 4)
Covered branches:2
Total branches:2
Branch coverage:100% (2 of 2)

Metrics

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

File(s)

C:\Git\azure-sdk-for-net\sdk\storage\Azure.Storage.Queues\src\Models\QueueTraits.cs

#LineLine coverage
 1// Copyright (c) Microsoft Corporation. All rights reserved.
 2// Licensed under the MIT License.
 3
 4using System;
 5using System.Collections.Generic;
 6
 7namespace Azure.Storage.Queues.Models
 8{
 9    /// <summary>
 10    /// Specifies options for listing queues with the
 11    /// <see cref="QueueServiceClient.GetQueuesAsync"/> operation.
 12    /// </summary>
 13    [Flags]
 14    public enum QueueTraits
 15    {
 16        /// <summary>
 17        /// Flag specifying only the default information for queues
 18        /// should be included.
 19        /// </summary>
 20        None = 0,
 21
 22        /// <summary>
 23        /// Flag specifying that the queue's metadata should be
 24        /// included.
 25        /// </summary>
 26        Metadata = 1,
 27    }
 28
 29    /// <summary>
 30    /// QueueTraits enum methods
 31    /// </summary>
 32    internal static partial class QueueExtensions
 33    {
 34        /// <summary>
 35        /// Convert the details into a <see cref="ListQueuesIncludeType"/> value.
 36        /// </summary>
 37        /// <returns>A <see cref="ListQueuesIncludeType"/> value.</returns>
 38        internal static IEnumerable<ListQueuesIncludeType> AsIncludeTypes(this QueueTraits traits) =>
 3839            ((traits & QueueTraits.Metadata) == QueueTraits.Metadata)
 3840                ?
 3841                new ListQueuesIncludeType[] { ListQueuesIncludeType.Metadata } :
 3842                Array.Empty<ListQueuesIncludeType>();
 43    }
 44}

Methods/Properties

AsIncludeTypes(...)