< Summary

Class:Azure.ResourceManager.KeyVault.Models.VaultListResult
Assembly:Azure.ResourceManager.KeyVault
File(s):C:\Git\azure-sdk-for-net\sdk\keyvault\Azure.ResourceManager.KeyVault\src\Generated\Models\VaultListResult.cs
C:\Git\azure-sdk-for-net\sdk\keyvault\Azure.ResourceManager.KeyVault\src\Generated\Models\VaultListResult.Serialization.cs
Covered lines:18
Uncovered lines:3
Coverable lines:21
Total lines:77
Line coverage:85.7% (18 of 21)
Covered branches:8
Total branches:8
Branch coverage:100% (8 of 8)

Metrics

MethodCyclomatic complexity Line coverage Branch coverage
.ctor()-0%100%
.ctor(...)-100%100%
get_Value()-100%100%
get_NextLink()-100%100%
DeserializeVaultListResult(...)-100%100%

File(s)

C:\Git\azure-sdk-for-net\sdk\keyvault\Azure.ResourceManager.KeyVault\src\Generated\Models\VaultListResult.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 Azure.Core;
 10
 11namespace Azure.ResourceManager.KeyVault.Models
 12{
 13    /// <summary> List of vaults. </summary>
 14    public partial class VaultListResult
 15    {
 16        /// <summary> Initializes a new instance of VaultListResult. </summary>
 017        internal VaultListResult()
 18        {
 019            Value = new ChangeTrackingList<Vault>();
 020        }
 21
 22        /// <summary> Initializes a new instance of VaultListResult. </summary>
 23        /// <param name="value"> The list of vaults. </param>
 24        /// <param name="nextLink"> The URL to get the next set of vaults. </param>
 825        internal VaultListResult(IReadOnlyList<Vault> value, string nextLink)
 26        {
 827            Value = value;
 828            NextLink = nextLink;
 829        }
 30
 31        /// <summary> The list of vaults. </summary>
 832        public IReadOnlyList<Vault> Value { get; }
 33        /// <summary> The URL to get the next set of vaults. </summary>
 834        public string NextLink { get; }
 35    }
 36}

C:\Git\azure-sdk-for-net\sdk\keyvault\Azure.ResourceManager.KeyVault\src\Generated\Models\VaultListResult.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.KeyVault.Models
 13{
 14    public partial class VaultListResult
 15    {
 16        internal static VaultListResult DeserializeVaultListResult(JsonElement element)
 17        {
 818            Optional<IReadOnlyList<Vault>> value = default;
 819            Optional<string> nextLink = default;
 4020            foreach (var property in element.EnumerateObject())
 21            {
 1222                if (property.NameEquals("value"))
 23                {
 824                    List<Vault> array = new List<Vault>();
 4025                    foreach (var item in property.Value.EnumerateArray())
 26                    {
 1227                        array.Add(Vault.DeserializeVault(item));
 28                    }
 829                    value = array;
 830                    continue;
 31                }
 432                if (property.NameEquals("nextLink"))
 33                {
 434                    nextLink = property.Value.GetString();
 35                    continue;
 36                }
 37            }
 838            return new VaultListResult(Optional.ToList(value), nextLink.Value);
 39        }
 40    }
 41}