< Summary

Class:Azure.ResourceManager.Network.Models.ConnectionMonitorQueryResult
Assembly:Azure.ResourceManager.Network
File(s):C:\Git\azure-sdk-for-net\sdk\network\Azure.ResourceManager.Network\src\Generated\Models\ConnectionMonitorQueryResult.cs
C:\Git\azure-sdk-for-net\sdk\network\Azure.ResourceManager.Network\src\Generated\Models\ConnectionMonitorQueryResult.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_SourceStatus()-0%100%
get_States()-0%100%
DeserializeConnectionMonitorQueryResult(...)-0%0%

File(s)

C:\Git\azure-sdk-for-net\sdk\network\Azure.ResourceManager.Network\src\Generated\Models\ConnectionMonitorQueryResult.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> List of connection states snapshots. </summary>
 13    public partial class ConnectionMonitorQueryResult
 14    {
 15        /// <summary> Initializes a new instance of ConnectionMonitorQueryResult. </summary>
 016        internal ConnectionMonitorQueryResult()
 17        {
 018        }
 19
 20        /// <summary> Initializes a new instance of ConnectionMonitorQueryResult. </summary>
 21        /// <param name="sourceStatus"> Status of connection monitor source. </param>
 22        /// <param name="states"> Information about connection states. </param>
 023        internal ConnectionMonitorQueryResult(ConnectionMonitorSourceStatus? sourceStatus, IReadOnlyList<ConnectionState
 24        {
 025            SourceStatus = sourceStatus;
 026            States = states;
 027        }
 28
 29        /// <summary> Status of connection monitor source. </summary>
 030        public ConnectionMonitorSourceStatus? SourceStatus { get; }
 31        /// <summary> Information about connection states. </summary>
 032        public IReadOnlyList<ConnectionStateSnapshot> States { get; }
 33    }
 34}

C:\Git\azure-sdk-for-net\sdk\network\Azure.ResourceManager.Network\src\Generated\Models\ConnectionMonitorQueryResult.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 ConnectionMonitorQueryResult
 15    {
 16        internal static ConnectionMonitorQueryResult DeserializeConnectionMonitorQueryResult(JsonElement element)
 17        {
 018            ConnectionMonitorSourceStatus? sourceStatus = default;
 019            IReadOnlyList<ConnectionStateSnapshot> states = default;
 020            foreach (var property in element.EnumerateObject())
 21            {
 022                if (property.NameEquals("sourceStatus"))
 23                {
 024                    if (property.Value.ValueKind == JsonValueKind.Null)
 25                    {
 26                        continue;
 27                    }
 028                    sourceStatus = new ConnectionMonitorSourceStatus(property.Value.GetString());
 029                    continue;
 30                }
 031                if (property.NameEquals("states"))
 32                {
 033                    if (property.Value.ValueKind == JsonValueKind.Null)
 34                    {
 35                        continue;
 36                    }
 037                    List<ConnectionStateSnapshot> array = new List<ConnectionStateSnapshot>();
 038                    foreach (var item in property.Value.EnumerateArray())
 39                    {
 040                        if (item.ValueKind == JsonValueKind.Null)
 41                        {
 042                            array.Add(null);
 43                        }
 44                        else
 45                        {
 046                            array.Add(ConnectionStateSnapshot.DeserializeConnectionStateSnapshot(item));
 47                        }
 48                    }
 049                    states = array;
 50                    continue;
 51                }
 52            }
 053            return new ConnectionMonitorQueryResult(sourceStatus, states);
 54        }
 55    }
 56}