< Summary

Class:Azure.ResourceManager.Network.Models.ConnectivityParameters
Assembly:Azure.ResourceManager.Network
File(s):C:\Git\azure-sdk-for-net\sdk\network\Azure.ResourceManager.Network\src\Generated\Models\ConnectivityParameters.cs
C:\Git\azure-sdk-for-net\sdk\network\Azure.ResourceManager.Network\src\Generated\Models\ConnectivityParameters.Serialization.cs
Covered lines:18
Uncovered lines:18
Coverable lines:36
Total lines:99
Line coverage:50% (18 of 36)
Covered branches:5
Total branches:10
Branch coverage:50% (5 of 10)

Metrics

MethodCyclomatic complexity Line coverage Branch coverage
.ctor(...)-75%50%
.ctor(...)-0%100%
get_Source()-100%100%
get_Destination()-100%100%
get_Protocol()-0%100%
get_ProtocolConfiguration()-0%100%
get_PreferredIPVersion()-0%100%
Azure.Core.IUtf8JsonSerializable.Write(...)-62.5%50%

File(s)

C:\Git\azure-sdk-for-net\sdk\network\Azure.ResourceManager.Network\src\Generated\Models\ConnectivityParameters.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;
 9
 10namespace Azure.ResourceManager.Network.Models
 11{
 12    /// <summary> Parameters that determine how the connectivity check will be performed. </summary>
 13    public partial class ConnectivityParameters
 14    {
 15        /// <summary> Initializes a new instance of ConnectivityParameters. </summary>
 16        /// <param name="source"> The source of the connection. </param>
 17        /// <param name="destination"> The destination of connection. </param>
 418        public ConnectivityParameters(ConnectivitySource source, ConnectivityDestination destination)
 19        {
 420            if (source == null)
 21            {
 022                throw new ArgumentNullException(nameof(source));
 23            }
 424            if (destination == null)
 25            {
 026                throw new ArgumentNullException(nameof(destination));
 27            }
 28
 429            Source = source;
 430            Destination = destination;
 431        }
 32
 33        /// <summary> Initializes a new instance of ConnectivityParameters. </summary>
 34        /// <param name="source"> The source of the connection. </param>
 35        /// <param name="destination"> The destination of connection. </param>
 36        /// <param name="protocol"> Network protocol. </param>
 37        /// <param name="protocolConfiguration"> Configuration of the protocol. </param>
 38        /// <param name="preferredIPVersion"> Preferred IP version of the connection. </param>
 039        internal ConnectivityParameters(ConnectivitySource source, ConnectivityDestination destination, Protocol? protoc
 40        {
 041            Source = source;
 042            Destination = destination;
 043            Protocol = protocol;
 044            ProtocolConfiguration = protocolConfiguration;
 045            PreferredIPVersion = preferredIPVersion;
 046        }
 47
 48        /// <summary> The source of the connection. </summary>
 849        public ConnectivitySource Source { get; }
 50        /// <summary> The destination of connection. </summary>
 851        public ConnectivityDestination Destination { get; }
 52        /// <summary> Network protocol. </summary>
 053        public Protocol? Protocol { get; set; }
 54        /// <summary> Configuration of the protocol. </summary>
 055        public ProtocolConfiguration ProtocolConfiguration { get; set; }
 56        /// <summary> Preferred IP version of the connection. </summary>
 057        public IPVersion? PreferredIPVersion { get; set; }
 58    }
 59}

C:\Git\azure-sdk-for-net\sdk\network\Azure.ResourceManager.Network\src\Generated\Models\ConnectivityParameters.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.Text.Json;
 9using Azure.Core;
 10
 11namespace Azure.ResourceManager.Network.Models
 12{
 13    public partial class ConnectivityParameters : IUtf8JsonSerializable
 14    {
 15        void IUtf8JsonSerializable.Write(Utf8JsonWriter writer)
 16        {
 817            writer.WriteStartObject();
 818            writer.WritePropertyName("source");
 819            writer.WriteObjectValue(Source);
 820            writer.WritePropertyName("destination");
 821            writer.WriteObjectValue(Destination);
 822            if (Protocol != null)
 23            {
 024                writer.WritePropertyName("protocol");
 025                writer.WriteStringValue(Protocol.Value.ToString());
 26            }
 827            if (ProtocolConfiguration != null)
 28            {
 029                writer.WritePropertyName("protocolConfiguration");
 030                writer.WriteObjectValue(ProtocolConfiguration);
 31            }
 832            if (PreferredIPVersion != null)
 33            {
 034                writer.WritePropertyName("preferredIPVersion");
 035                writer.WriteStringValue(PreferredIPVersion.Value.ToString());
 36            }
 837            writer.WriteEndObject();
 838        }
 39    }
 40}