< Summary

Class:Azure.ResourceManager.EventHubs.Models.AuthorizationRuleListResult
Assembly:Azure.ResourceManager.EventHubs
File(s):C:\Git\azure-sdk-for-net\sdk\eventhub\Azure.ResourceManager.EventHubs\src\Generated\Models\AuthorizationRuleListResult.cs
C:\Git\azure-sdk-for-net\sdk\eventhub\Azure.ResourceManager.EventHubs\src\Generated\Models\AuthorizationRuleListResult.Serialization.cs
Covered lines:18
Uncovered lines:6
Coverable lines:24
Total lines:90
Line coverage:75% (18 of 24)
Covered branches:10
Total branches:14
Branch coverage:71.4% (10 of 14)

Metrics

MethodCyclomatic complexity Line coverage Branch coverage
.ctor()-0%100%
.ctor(...)-100%100%
get_Value()-100%100%
get_NextLink()-100%100%
DeserializeAuthorizationRuleListResult(...)-75%71.43%

File(s)

C:\Git\azure-sdk-for-net\sdk\eventhub\Azure.ResourceManager.EventHubs\src\Generated\Models\AuthorizationRuleListResult.cs

#LineLine coverage
 1// Copyright (c) Microsoft Corporation. All rights reserved.
 2// Licensed under the MIT License.
 3
 4// <auto-generated/>
 5
 6#nullable disable
 7
 8using System.Collections.Generic;
 9
 10namespace Azure.ResourceManager.EventHubs.Models
 11{
 12    /// <summary> The response from the List namespace operation. </summary>
 13    public partial class AuthorizationRuleListResult
 14    {
 15        /// <summary> Initializes a new instance of AuthorizationRuleListResult. </summary>
 016        internal AuthorizationRuleListResult()
 17        {
 018        }
 19
 20        /// <summary> Initializes a new instance of AuthorizationRuleListResult. </summary>
 21        /// <param name="value"> Result of the List Authorization Rules operation. </param>
 22        /// <param name="nextLink"> Link to the next set of results. Not empty if Value contains an incomplete list of A
 1223        internal AuthorizationRuleListResult(IReadOnlyList<AuthorizationRule> value, string nextLink)
 24        {
 1225            Value = value;
 1226            NextLink = nextLink;
 1227        }
 28
 29        /// <summary> Result of the List Authorization Rules operation. </summary>
 1230        public IReadOnlyList<AuthorizationRule> Value { get; }
 31        /// <summary> Link to the next set of results. Not empty if Value contains an incomplete list of Authorization R
 1232        public string NextLink { get; }
 33    }
 34}

C:\Git\azure-sdk-for-net\sdk\eventhub\Azure.ResourceManager.EventHubs\src\Generated\Models\AuthorizationRuleListResult.Serialization.cs

#LineLine coverage
 1// Copyright (c) Microsoft Corporation. All rights reserved.
 2// Licensed under the MIT License.
 3
 4// <auto-generated/>
 5
 6#nullable disable
 7
 8using System.Collections.Generic;
 9using System.Text.Json;
 10using Azure.Core;
 11
 12namespace Azure.ResourceManager.EventHubs.Models
 13{
 14    public partial class AuthorizationRuleListResult
 15    {
 16        internal static AuthorizationRuleListResult DeserializeAuthorizationRuleListResult(JsonElement element)
 17        {
 1218            IReadOnlyList<AuthorizationRule> value = default;
 1219            string nextLink = default;
 4820            foreach (var property in element.EnumerateObject())
 21            {
 1222                if (property.NameEquals("value"))
 23                {
 1224                    if (property.Value.ValueKind == JsonValueKind.Null)
 25                    {
 26                        continue;
 27                    }
 1228                    List<AuthorizationRule> array = new List<AuthorizationRule>();
 5629                    foreach (var item in property.Value.EnumerateArray())
 30                    {
 1631                        if (item.ValueKind == JsonValueKind.Null)
 32                        {
 033                            array.Add(null);
 34                        }
 35                        else
 36                        {
 1637                            array.Add(AuthorizationRule.DeserializeAuthorizationRule(item));
 38                        }
 39                    }
 1240                    value = array;
 1241                    continue;
 42                }
 043                if (property.NameEquals("nextLink"))
 44                {
 045                    if (property.Value.ValueKind == JsonValueKind.Null)
 46                    {
 47                        continue;
 48                    }
 049                    nextLink = property.Value.GetString();
 50                    continue;
 51                }
 52            }
 1253            return new AuthorizationRuleListResult(value, nextLink);
 54        }
 55    }
 56}