< Summary

Class:Azure.ResourceManager.Network.Models.BastionActiveSessionListResult
Assembly:Azure.ResourceManager.Network
File(s):C:\Git\azure-sdk-for-net\sdk\network\Azure.ResourceManager.Network\src\Generated\Models\BastionActiveSessionListResult.cs
C:\Git\azure-sdk-for-net\sdk\network\Azure.ResourceManager.Network\src\Generated\Models\BastionActiveSessionListResult.Serialization.cs
Covered lines:0
Uncovered lines:24
Coverable lines:24
Total lines:90
Line coverage:0% (0 of 24)
Covered branches:0
Total branches:14
Branch coverage:0% (0 of 14)

Metrics

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

File(s)

C:\Git\azure-sdk-for-net\sdk\network\Azure.ResourceManager.Network\src\Generated\Models\BastionActiveSessionListResult.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.Network.Models
 11{
 12    /// <summary> Response for GetActiveSessions. </summary>
 13    public partial class BastionActiveSessionListResult
 14    {
 15        /// <summary> Initializes a new instance of BastionActiveSessionListResult. </summary>
 016        internal BastionActiveSessionListResult()
 17        {
 018        }
 19
 20        /// <summary> Initializes a new instance of BastionActiveSessionListResult. </summary>
 21        /// <param name="value"> List of active sessions on the bastion. </param>
 22        /// <param name="nextLink"> The URL to get the next set of results. </param>
 023        internal BastionActiveSessionListResult(IReadOnlyList<BastionActiveSession> value, string nextLink)
 24        {
 025            Value = value;
 026            NextLink = nextLink;
 027        }
 28
 29        /// <summary> List of active sessions on the bastion. </summary>
 030        public IReadOnlyList<BastionActiveSession> Value { get; }
 31        /// <summary> The URL to get the next set of results. </summary>
 032        public string NextLink { get; }
 33    }
 34}

C:\Git\azure-sdk-for-net\sdk\network\Azure.ResourceManager.Network\src\Generated\Models\BastionActiveSessionListResult.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.Network.Models
 13{
 14    public partial class BastionActiveSessionListResult
 15    {
 16        internal static BastionActiveSessionListResult DeserializeBastionActiveSessionListResult(JsonElement element)
 17        {
 018            IReadOnlyList<BastionActiveSession> value = default;
 019            string nextLink = default;
 020            foreach (var property in element.EnumerateObject())
 21            {
 022                if (property.NameEquals("value"))
 23                {
 024                    if (property.Value.ValueKind == JsonValueKind.Null)
 25                    {
 26                        continue;
 27                    }
 028                    List<BastionActiveSession> array = new List<BastionActiveSession>();
 029                    foreach (var item in property.Value.EnumerateArray())
 30                    {
 031                        if (item.ValueKind == JsonValueKind.Null)
 32                        {
 033                            array.Add(null);
 34                        }
 35                        else
 36                        {
 037                            array.Add(BastionActiveSession.DeserializeBastionActiveSession(item));
 38                        }
 39                    }
 040                    value = array;
 041                    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            }
 053            return new BastionActiveSessionListResult(value, nextLink);
 54        }
 55    }
 56}